HOW TO: any object can contain a certain entity

Posts   
 
    
Mountain
User
Posts: 21
Joined: 01-Apr-2005
# Posted on: 13-Apr-2005 19:47:29   

In our application, we would like to have a generic entity (called FlexProperties) that can be used by (and contained within) a variety of other business objects.

In our normal approach, we would include ClassType and ClassID columns in the FlexProperty table, and then write code to associate the right FlexProperty object with the business entity object that contains it.

My question is how would we handle this with LLBL? We can't create a normal FK because the ClassID value could point to the PK in any of a number of other tables in the db.

Is a design like this compatible with LLBL, and if so, how should we approach it? Thanks!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 13-Apr-2005 21:05:54   

Though one. you can't define the relation in the designer, though you can create an EntityRelation object in code, which then allows you to fetch data using that relation for example, is that what you're looking for?

Frans Bouma | Lead developer LLBLGen Pro