Dynamic Fetches

Posts   
 
    
BaileyK83
User
Posts: 29
Joined: 30-Dec-2006
# Posted on: 06-Aug-2007 19:06:41   

If I have ObjectTable as a base and EmployeeTable, ManagerTable, CatTable, BearTable inherit from ObjectTable

When I fetch an entity collection of ObjectTable it will return Employee, Manager, Cat, Bear and Object Entities.

I'm guessing it does this by hitting all of the Employee, Managaer... tables for each record in the object table. Does that increase the fetch for each object entity by 1 for each table I inherit from object and also for each entity that is added to the object table?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 07-Aug-2007 04:11:06   

LLBLGenPro ORMSupportClasses use INNER JOINS to achieve that.

Copied from LLBLGenPro Help:

Deep hierarchies of TargetPerEntity can cause performance problems. When you create deep hierarchies of type TargetPerEntity, so the leafs in your hierarchy are mapped onto a lot of tables, you have to be aware of the fact that when you fetch entities of that hierarchy, the runtime libraries will create INNER JOINs to be able to pull derived entity instances as well. This can lead to some performance degrease when your tables are very large (large amount of records)

For further information read: LLBLGenPro Help - Concepts - Entity inheritance and relational models LLBLGenPro Help - Using generated code - (Adapter | SS) - Using the entity classes - Polymorphic fetches

David Elizondo | LLBLGen Support Team