Entity Generator - No references

Jan 15, 2013 at 12:07 PM

Hi,

I'm running into an issue where the Entity Generator isn't generate the reference information:

  [Reference(typeof(Author), "AuthorID", ReferenceType = ReferenceType.ManyToOne)]

Not sure what I'm missing or if this is an issue.

 
Coordinator
Jan 15, 2013 at 2:44 PM

I need a bit more info - specifically I'd need the original database you're feeding into EntityGenerator.  Is there an explicitly defined foreign key in the database between the fields you want the reference on?

Jan 15, 2013 at 3:14 PM

Emailed you the SQL CE DB.

Looking at the code, the code generation portion seems to be there.  However I can't see where the EntityInfo.References would get populated.

I'm using the latest code - Downloaded from the "Source Code" section.

Thanks

Coordinator
Jan 17, 2013 at 2:48 PM

Yeah, currently there is reference support in EntityGenerator only for SQLite databases (see SQLiteDataSource.cs, starting at line 165).  I'll look at adding it for SQL Ce next.

Coordinator
Jan 17, 2013 at 3:45 PM

Go ahead and get the latest changeset.  This should add support for SQLCE references.