We received your test project, but I cannot duplicate your issue under Win XP with the latest ES 2008.0.0611.0 release candidate, MyGen 1.3.0.3, and VistaDB 3.3.1.57.
I started with a clean ES slate... un-installed all versions of ES, manually deleted any left over ES Program and template folders in Windows Explorer, and deleted all ES xml files from the MyGeneration13 Settings folder. I then downloaded and installed the ES release candidate from the "Products | Downloads" forum on our site. I even added a batch file to my StartUp folder that did a "subst u: c:\drive_u", so that I could set up your folder structure, copy your test db file there, and run your project, without alteration, rather than my own.
MyGeneration and VistaDB were already installed, and MyMeta.Plugins.VistaDB3x.dll had been recompiled and copied to the MyGen13 folder. I was able to successfully test a connection to your test db in MyGen default settings, so I did not have to un-install, or re-install MyGeneration, nor did I have to manually copy esSettings.xml or any other file.
I just took the default installation for ES, opened your project in MyGen, and executed it. The generated file had correct data types for LoadByPrimaryKey and all 3 properties, just like the CodeSmith generated file in your Generated folder. Closing and opening the Project, or MyGeneration did not affect the outcome. The file was always generated correctly.
Code:
/*
===============================================================================
EntitySpaces(TM) 2008 by EntitySpaces, LLC
Persistence Layer and Business Objects for Microsoft .NET
http://www.entityspaces.net
===============================================================================
EntitySpaces Version # 2008.0.0611.0
MyGeneration Version # 1.3.0.3
Date Generated : 6/19/2008 4:31:20 AM
===============================================================================
*/
// ...
#region LoadByPrimaryKey
public virtual bool LoadByPrimaryKey(System.Int32 id)
{
if(this.es.Connection.SqlAccessType == esSqlAccessType.DynamicSQL)
return LoadByPrimaryKeyDynamic(id);
else
return LoadByPrimaryKeyStoredProcedure(id);
}
// ...
The only settings file installed to the MyGeneration Settings folder is esLanguages.xml, and that is what determines data type mappings. If you can successfully connect to your db in MyGen default settings, then you should be able to generate files correctly from your project. Even if at a later date you change to different default settings, the project should still run correctly against the VistaDB file. esSettings.xml and esUserData.xml are only required if you need to change something from the default, such as stored procedure prefixes, or column aliases. They are created on first use of the ES Settings or UserData templates. If they do not exist, the defaults apply.
Unless this is a Windows Vista UAC issue, I'm not sure what else to check. If you are on Vista, make sure you right-click and install as administrator. When running MyGen, also, right-click and run as administrator.
David Neal Parsons
www.entityspaces.net