LLBLGen features questions

Posts   
 
    
ged2012
User
Posts: 2
Joined: 31-Jul-2012
# Posted on: 31-Jul-2012 17:00:39   

Hi,

I am trying to find the right ORM framework for my project. Here is the story: I am creating application that uses already existing database structure that cannot be modified. I can retrieve anything I want with queries but there are strict rules on updating data. Simplified example: I have a db table that contains data for several business classes, each class is discriminated by value of several fields. To make matters worse some of those business classes have additional attributes stored in a different table. Table1: ID, Name, Role, LocationID, Notes Table2: ID, Table1_ID, AttName, AttValue

Class1_R1_L1: ID, Name, Notes, AttName1, AttName2 (for Role=R1 and LocationID=L1) Class2_R2_L2: ID, Name, Notes, AttName3, AttName4, AttName5 (for Role=R2 and LocationID=L2)

My questions are: 1. is LLBLGen framework capable of supporting such scenario. 2. Is it possible to use Linq queries on business data in such scenario 3. Is it possible to create/intercept update code to update AttName* fields differently in such scenario 4. Is it possible to create/intercept creation code to set appropriate values for Role and LocationID in such scenario? 5. Is it possible to retrieve data in another thread?

Kris

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 31-Jul-2012 18:27:08   

Having data from several business classes in the same table is a bad practice that we don't support, unless the classes are related (inheritance hierarchy) and one field can be used to discriminate them and the discrimination values are known at design time.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 01-Aug-2012 10:38:00   

I don't know of any ORM which supports inheritance in that specific way. Because: when to decide table2 is joined with it? You can only decide that if you look at a value in table1, correct?

Frans Bouma | Lead developer LLBLGen Pro
ged2012
User
Posts: 2
Joined: 31-Jul-2012
# Posted on: 01-Aug-2012 20:26:09   

Thanks for the answers. The database design is given to me and I am only trying to make things easier for me - which simply means I do try very hard to avoid reinventing the wheel^H ORM. Besides for the case I'm working on writing an ORM is an overkill, because significant amount of budget would go to writing a tool for specific case that would not be useful later.

Thanks for help Kris