openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garpinc <garp...@yahoo.com>
Subject is it possible to save just the primary key of an object reference?
Date Sat, 04 Aug 2012 14:45:14 GMT
I have a scenario where tables are arranged and mapped as follows

TableA -> TableB(with primary key TableC)

to populate TableB I create an instance of TableB and set it's id  using an
instance of TableC and the persist C

What I'd like to do is persist just the pointers to TableC (which will also
later become pointers to TableB when I create a TableB instance)

How would I map that? Since currently the mapping is from TableA->TableB
there is no way to assign TableC instances to that collection on TableA so
I'm having to save both TableB instances and TableC instances at the same
time. The problem for me is I want to fill in TableB and only want to
populate the association now.



--
View this message in context: http://openjpa.208410.n2.nabble.com/is-it-possible-to-save-just-the-primary-key-of-an-object-reference-tp7580796.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message