Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Collection APOI to update relationships

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
I found some pretty shells, some sea glass and this lovely tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic