| Author |
Datatable: Link foreign keys to actual data
|
Samson Mlati
Ranch Hand
Joined: Feb 23, 2009
Posts: 41
|
|
|
I have a datatable whose source is a table with some foreign keys in it. I would like to replace the foreign keys with a an entry from a column in the related table. Is there an easy way to do this?
|
Best,
Mlati
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
One of the easiest to code (though not to setup) is to use an ORM. In that case, you can simply refer to embedded object properties. For example:
Where the Object Model for invoice replaces the explicit foreign key with the object represented by the foreign key. But it does require that you ensure that the header object is loaded in time, since the default on most ORMs is lazy fetching. That's not all that hard to do, though.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: Datatable: Link foreign keys to actual data
|
|
|