GeneralEntityFactory conflict

Posts   
 
    
Steve Mann
User
Posts: 31
Joined: 22-Nov-2006
# Posted on: 22-Nov-2006 11:08:57   

I'm trialling the latest version. When I try to Build the generated code I get:

class 'GeneralEntityFactory' and class 'GeneralEntityFactory' conflict in namespace 'FactoryClasses'

The code is in EntityFactories.vb:

If CF Then

<SD.LLBLGen.Pro.ORMSupportClasses.Serializable()> _
Public Class GeneralEntityFactory

Else

<Serializable()> _
Public Class GeneralEntityFactory

End If

The error is in the 6th line.

Any ideas?

Steve Mann
User
Posts: 31
Joined: 22-Nov-2006
# Posted on: 22-Nov-2006 11:28:43   

Oops! Just realized we have a table called General. I guess you create a GeneralEntityFactory?

By the way, I've been trying to load my schemas in Deklarit for two weeks without success.

LLBLGEN took 10 minutes, and generated two errors in the Build, one of which was a design fault in my database.

VERY impressive.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 22-Nov-2006 11:46:22   

Steve wrote:

Oops! Just realized we have a table called General. I guess you create a GeneralEntityFactory?

That's indeed what happens. In the EntityFactories.vb file, there's a class called GeneralEntityFactory, which creates a new entity factory based on the passed in EntityType value, so you don't have to have an instance of a particular entityfactory at hand.

Indeed, this clashes with the factory created for the entity called 'General'. Sorry about that. We did think that the general factory's name GeneralEntityFactory wouldn't normally clash with the entity factory created by an entity, but you ran into this. This is unfortunate, as we can't change the name of GeneralEntityFactory without breaking code.

What you can do is renaming the entity 'General' in the designer, using the project explorer or the entity editor. (e.g. 'GeneralData'). It then should be ok. simple_smile

By the way, I've been trying to load my schemas in Deklarit for two weeks without success.

LLBLGEN took 10 minutes, and generated two errors in the Build, one of which was a design fault in my database.

VERY impressive.

Thanks! smile

Frans Bouma | Lead developer LLBLGen Pro
Steve Mann
User
Posts: 31
Joined: 22-Nov-2006
# Posted on: 22-Nov-2006 11:54:10   

Thanks very much for your help.

I will rename my database table.

After all, you have to call your classes something, and 'General' is a pretty unusual name for a table!

Regards

Steve Mann