This is a migrated thread and some comments may be shown as answers.

[Solved] GetObjectById with multi-column primary key table

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
richardFlow
Top achievements
Rank 1
richardFlow asked on 31 Aug 2010, 10:09 PM
Hi,

Is it possible to use GetObjectById with a multi-column primary key? Could you please give example.

Thanks!

1 Answer, 1 is accepted

Sort by
0
IT-Als
Top achievements
Rank 1
answered on 01 Sep 2010, 07:54 AM
Hi Web Belief,

You should really check this article in the docs, that covers multiple field identity for classes.

To summarize the article in the doc, you must provide an object identity class which holds all the fields your key consists of. Then decorate the class to use this identity class.

When you want to use the GetObjectById you pass an instance of the object identity class (filled with the keys you want to do a lookup on) as parameter.

Regards

Henrik

Tags
General Discussions
Asked by
richardFlow
Top achievements
Rank 1
Answers by
IT-Als
Top achievements
Rank 1
Share this question
or