Adding a field to an entity

Posts   
 
    
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 17-Jan-2006 19:41:49   

Hi Guys,

I know this is a newbie type question but I'm a little brain dead this moring, so here goes:

How do I go about adding a field to an enitity that is not mapped to the table?

I know I can do it with inheratance but I thought it was also possible using the designer to specify unmapped fields. Indeed, there is a tab for it in the designer, but it looks as though it is used for table inheratance which I know nothing about.

Thanks,

Fishy

[Edit] Just realized that this should have been posted in the "Generated Code" section.

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 17-Jan-2006 22:05:03   

Fishy wrote:

Hi Guys,

I know this is a newbie type question but I'm a little brain dead this moring, so here goes:

How do I go about adding a field to an enitity that is not mapped to the table?

I know I can do it with inheratance but I thought it was also possible using the designer to specify unmapped fields. Indeed, there is a tab for it in the designer, but it looks as though it is used for table inheratance which I know nothing about.

Thanks,

Fishy

[Edit] Just realized that this should have been posted in the "Generated Code" section.

You just need to add the field in the generated code in the _LLBLGen comments so it won't get overwritten.

Un-map fields list is for fields that ARE in the table which you don't wan't in the class/object.

BOb

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 18-Jan-2006 16:15:13   

I couldn't find any documentation on _LLBLGen. Where would I find some help on this?

Thanks,

Fishy

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 18-Jan-2006 17:12:28   

pilotboba wrote:

You just need to add the field in the generated code in the _LLBLGen comments so it won't get overwritten.

Un-map fields list is for fields that ARE in the table which you don't wan't in the class/object.

BOb

I think I know what your saying.

No way through the Designer, huh?

I really wanted all of the functionallity of a regular field with the exception of persistance to the database.

Thanks,

Fishy

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 18-Jan-2006 17:37:11   

Fishy wrote:

I think I know what your saying.

No way through the Designer, huh?

Not that I know of.

BOb

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 19-Jan-2006 02:47:20   

I believe he was saying to place the fields in a user code region like this.

// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode // __LLBLGENPRO_USER_CODE_REGION_END

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 19-Jan-2006 17:31:55   

bclubb wrote:

I believe he was saying to place the fields in a user code region like this.

// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode // __LLBLGENPRO_USER_CODE_REGION_END

ok, thanks guys.

ps: It would be cool in a future release to have a section in the Designer to create unmapped (not related to a table) fields. stuck_out_tongue_winking_eye