Print Page | Close Window

Multi-Table Entity

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1557
Printed Date: 23-Apr-2025 at 6:06pm


Topic: Multi-Table Entity
Posted By: ddorival
Subject: Multi-Table Entity
Date Posted: 17-Nov-2009 at 7:54am
Not sure if this question has been submitted before but I wasn't able to find it. Is it possible in DevForce classic to create an entity that spans multiple tables? I don't expect that this can be done using the object mapper, but can it be accomplished by manually editing the .orm or the entity class?



Replies:
Posted By: davidklitzke
Date Posted: 17-Nov-2009 at 11:13am
You can't really do this with the Object Mapper, but you can do it with code.  There is an advanced tutorial called "336. Dynamic Entities" that shows how to do this.  This tutorial also includes documentation from the Developer's Guide on Dynamic Entities.


Posted By: ddorival
Date Posted: 17-Nov-2009 at 12:36pm
I have been looking at Dynamic Entities but I'm not sure if they will work how I need them to. Can you create an updateable dynamic entity that is populated from multiple tables? From what I understand so far, to populate a dynamic entity from multiple tables you will have to use a query that joins both tables. Can you do this and still make it persistable?
 
Also, if I do have to use dynamic entities it will be a bit of a hassle to have to create them at runtime and lose strong typing for accessing the properties. Not a huge deal but will still be a nuisance.



Print Page | Close Window