Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Collection APOI to update relationships

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
Why fit in when you were born to stand out? - Seuss. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic