• Post Reply Bookmark Topic Watch Topic
  • New Topic

Collection APOI to update relationships  RSS feed

gabriele rigamonti
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In spec :

'If argument to add method is not an element of a collection-valued relationship of the same relationship type,it is simply added to the target collection and not removed from its current collection,if any'.

I have make a simple example (with webLogic 8.1) like this:

A (1) -----------> (n) B

Collection a= ALocalObect.getB();

a.add(new Strinf("xxx")) //cause Error
a.add(ALocalHome.findByPrimaryKey("pkA1"); //also cause error
ALocalObject.setB(a); //Error java.lang.IllegalArgumentException

but i get an error and i'am confused about the content of the spec.

Tanks very much!!

Gabriele Rigamonti
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!