Inheritence - Overriding the Base Objects

Posts   
 
    
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 19-Feb-2006 00:55:31   

Hi All,

I like to add custom logic into the base classes... and thus I have overridden some of the classes.

For example:

BaseObject +------ MyCustomObject

I used the examples found in the docs.

My custom objects work fine - BUT, for some generated classes with Collections, they still refer to the base objects.

Is there a way to change this behaviour in LLBLGen? Basically I like the framework to generate code which points to my custom classes rather than the base objects.

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 19-Feb-2006 12:42:02   

If you're using adapter, please use the extended templates for adapter, available to you in the 3rd party section.

Frans Bouma | Lead developer LLBLGen Pro
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 20-Feb-2006 22:01:41   

Otis wrote:

If you're using adapter, please use the extended templates for adapter, available to you in the 3rd party section.

Hello,

Just bought a license today, do you mean these templates?

Extended entity generator templates for Adapter

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 20-Feb-2006 22:22:10   

correct simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 20-Feb-2006 22:33:00   

Otis wrote:

correct simple_smile

Is there any sample code on how to use these templates? When I generated my existing project, there are no subclasses created... do I need to define the subclasses too? I was under the impression that the template would generate default sub classes?

I also noticed two errors in the template:

            Task EntityClassGenerator
                    Could not find template 'SD_DerivedEntityAdapterTemplate'. It is not defined in the template set config file.


            Task DerivedEntityFactoryClassesGenerator
                    Could not find template 'SD_DerivedEntityFactoriesAdapterTemplate'. It is not defined in the template set config file.

I do have two template files of similar name... but with out the SD_.

Is this a bug, or something wrong with my install.

Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 20-Feb-2006 23:32:46   

You have to select the proper generator config AND the proper template set! simple_smile You've only selected the generator config, but not the custom template set simple_smile THis will answer both questions simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mshe
User
Posts: 167
Joined: 02-Feb-2006
# Posted on: 20-Feb-2006 23:38:14   

Otis wrote:

You have to select the proper generator config AND the proper template set! simple_smile You've only selected the generator config, but not the custom template set simple_smile THis will answer both questions simple_smile

Worked great..... Thanks! ^_^