Duplicate Methods After 2nd Generate

Posts   
 
    
jv
User
Posts: 2
Joined: 30-Jun-2007
# Posted on: 30-Jun-2007 09:17:04   

I am evaluating the product and have noticed that if I generate code a 2nd time then methods in the HelperClasses get added twice causing build errors.

Is there a way round this or do I need to remove all generated code before each generation ?

Thanks JV

Posts: 254
Joined: 16-Nov-2006
# Posted on: 30-Jun-2007 23:32:48   

This isn't expected behaviour.

Are you changing the namespace the second time around?

Can you send the compiler errors which are being generated please?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 01-Jul-2007 13:15:00   

Code files are overwritten, so methods being added is unlikely, UNLESS you have added include templates, but as you're using the demo, I don't expect you have added include templates because the SDK isn't a public download.

You can have duplicate methods / fields when you are using inheritance and you have a relation to the same entity in the supertype and in the subtype and in both entities you have a field mapped onto that relation with the same name.

Example, Employee <- Manager. Both have a relation to Department (works for in employee and manages in manager). If in both entities the name of the field mapped onto that relation is 'Department', the entity 'Manager' has the field twice, namely for its own relation and it also inherits the one from Employee.

Could you please check if this is the case?

There's currently not a check build in for this, this check is implemented in v2.5, currently in beta.

Frans Bouma | Lead developer LLBLGen Pro
jv
User
Posts: 2
Joined: 30-Jun-2007
# Posted on: 02-Jul-2007 09:24:01   

Thanks for the quick replies. The support is obviously good for the product which is one of the reasons we are considering it over others, we noticed the forums are very active.

The problem seems to have gone away, i think what happened is that I created 2 LLBGen projects P1 and P2, and at some point generated p1 into p2 or vica-versa. i have just created a new project and generated a few times with no problems.

Apologies for the wated time.

John

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-Jul-2007 09:31:22   

No problem.