DataObjectUtils.objectForPK( ) is what you want.
On Jul 6, 2005, at 1:05 PM, Albert Jagnow wrote:
> Does Cayenne have a way to return a single object from the database
> if I already know its primary key? What I am looking for is
> something similar to the WebObjects method
> objectWithPrimaryKeyValue. I looked in the documentation and
> didn’t see anything similar, but since I am not sure exactly what I
> am looking for I could have missed it. Or do I always have to
> write a Query that returns a List even if all I want is one object?
>
>
>
> --Albert
>
>
>
> This e-mail (including any attachments) is covered by the
> Electronic Communications Privacy Act, 18 USC. 2510-2521. It is
> confidential and may be legally privileged. If you are not the
> intended recipient, you are hereby notified that any retention,
> dissemination, distribution, or copying of this communication is
> strictly prohibited. Please reply to the sender that you have
> received the message in error, and then delete it. Thank you.
>
This archive was generated by hypermail 2.0.0 : Wed Jul 06 2005 - 13:09:52 EDT