The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Unknown Datatype from command line, but not GUI

Last post 07-29-2008, 1:58 PM by warrenra8. 3 replies.
Sort Posts: Previous Next
  •  07-28-2008, 10:44 AM 10397

    Unknown Datatype from command line, but not GUI

    I've looked through all the posts referring to this type of problem, but it seems my situation is unique.  I have been using ES2007, and just recently upgraded to ES2008.  I am using MyGeneration1.3.

    With ES2007, I was initially generating classes from the GUI, but then learned that I could save an input file, and use that through the ZeusCmd.exe application to generate the classes from the command line.  This works beautifully, and has been the basis of my nightly build for a couple of months.

    When I upgraded to ES2008, I generated my classes from the GUI without issue.  Great!  I then regenerated the input file (new "chkLINQtoSQL" added), and attempted to generate through ZeusCmd.exe.  I'm surprised to discover that the generated classes do not build, due to "Unknown" datatypes throughout the file.  For example:

    Code:
    		public virtual bool LoadByPrimaryKey(Unknown requestId)
    {
    if(this.es.Connection.SqlAccessType == esSqlAccessType.DynamicSQL)
    return LoadByPrimaryKeyDynamic(requestId);
    else
    return
    LoadByPrimaryKeyStoredProcedure(requestId);
    }

    My first suspicion was that somehow the Languages.xml file is not being found.  It is clearly identified in the input file (only showing the first 10 or so lines here):

     

    Code:

    <obj name="" uid="ef8ca0b1-2214-4387-aa63-fa48f282a657" path="C:\dev\svn_dc\trunk\T6000\Common\3rdParty\EntitySpaces\2008.NET3.5\C#\EntitySpaces_C#_Generated_Master.csgen">
    <items>
    <item name="__dbConnectionString" type="System.String" val="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=AssayResults;Data Source=IB0237\SQLEXPRESS" />
    <item name="__dbDriver" type="System.String" val="SQL" />
    <item name="__dbLanguageMappingFileName" type="System.String" val="C:\Program Files\MyGeneration13\Settings\Languages.xml" />
    <item name="__dbTargetMappingFileName" type="System.String" val="C:\Program Files\MyGeneration13\Settings\DbTargets.xml" />
    <item name="__defaultOutputPath" type="System.String" val="C:\dev\svn_dc\trunk\T6000\DataManagement\AssayResults\AssayResultsDal" />
    <item name="__defaultTemplatePath" type="System.String" val="C:\dev\svn_dc\trunk\T6000\Common\3rdParty\EntitySpaces\2008.NET3.5" />
    <item name="__domainOverride" type="System.Boolean" val="True" />
    <item name="__userMetaDataFileName" type="System.String" val="C:\Program Files\MyGeneration13\Settings\UserMetaData.xml" />
    <item name="__version" type="System.String" val="1.3.0.3" />

    I tried moving the languages file to the same folder as the batch program that was launching ZeusCmd, and referring to it in a relative fashion, but that didn't work either.  It seems like if the GUI works, the command line should too, especially when the GUI generates the input file!  Something is not right, and I'm stuck.

    I wasn't sure whether or not the EntitySpaces forum was the right place to post this, but my problems definitely started with the upgrade to ES2008.  I should mention, that my ES2007 scripts still work, and still generate the classes correctly, so its not like I lost any files, I don't think.

    Any suggestions you can offer, would be greatly appreciated.  I'm anxious to include ES2008 in our regular build, so we can start taking advantage of the new features.  Big Smile

    Thanks.

  •  07-28-2008, 6:20 PM 10400 in reply to 10397

    Re: Unknown Datatype from command line, but not GUI

    Forgive this long explanation. ES2008 is was our 1st step at becoming "code generator" independent. We have our own metadata engine and no longer use MyMeta (of MyGeneration), this allows us to run under CodeSmith. We have our own files to, for instance:

    esLanguages.xml   
    esSettings.xml
    esUserData.xml

    You might be able to hand edit your project and change the references to those files or you might have to create a new project file. ES2009 will be self contained, have a built in code generator, a command line, and project files, it will be so much better.


    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  07-28-2008, 8:51 PM 10402 in reply to 10400

    Re: Unknown Datatype from command line, but not GUI

    I think you had the right idea, but, as Mike points out, we do not use Languages.xml in our ES2008 templates. The locations of ES2008's XML files are not included in a MyGeneration Project file (zprj) or Input file (zinp), so there is nothing that needs to be hand edited in them. What you can do is create a "Settings" folder in the same folder as the batch file that calls ZeusCmd.exe, and copy esLanguages.xml from the MyGeneration13\Settings folder into the new "Settings" folder you just created.

    The other two files, esSettings.xml and esUserData.xml, are created on first use of the ES2008 Settings and UserData templates, respectively. If they exist in your MyGeneration13\Settings folder, you should copy them as well. You might want to add a few lines to the top of our batch file that copies those files before any lines that call ZeusCmd. That way the output from your batch file will remain in sync with what is generated from the MyGeneration GUI.


    David Neal Parsons
    www.entityspaces.net
  •  07-29-2008, 1:58 PM 10418 in reply to 10402

    Re: Unknown Datatype from command line, but not GUI

    Thanks a bunch!! Copying the Settings folder to the folder with my batch file definitely solved the problem, and I'm back up and running.

    Thanks for answering so quickly!  I'm looking forward to seeing ES2009 someday.  It will be nice to break that dependance, and do your own code generation.

     

View as RSS news feed in XML