cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kvasnička jr." <>
Subject Changing relationships using only PK
Date Mon, 07 Jan 2008 13:06:40 GMT
Hi people,
I would like to add an object to a M:N relationship. Cayenne generated
those convenience methods starting with "addTo". These take DataObject
as a parameter and I noticed that it has to be a context-registered
object -- correct?

So if I have a collection of primary keys that correspond to primary
keys of objects I want to add to the relationship, I need to fetch
those objects for those PKs and then add them to the relationship --
Is it possible to add a object only on the basis of it's PK? Or do I
need to fetch the data first to ensure the object I want to bind is
still valid?

I know I could always do these things with raw sql, but I wanted to
know if there is any object way to do this.

I'm probably only missing something, so thanks for every hint ;)


-- -- webdesign & corporate design,
programování internetových a intranetových aplikací

View raw message