Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

CMR getter and setter

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have some question about CMR. If Order and OrderLineItem has 1 to many bi-direction relationship. Do I need to declare CMR getter and setter methods in both Local Object?

In page 284 of "Teach yourself EJB in 21 days",it declared getOrder and setOrder in OrderLineItemLocal class. But it did not declare CMR getter and setter methods (like getLineItems() and and setLineItems(Collection ..) in OrderLocal class? It only declared them in OrderEJB.

Can some one have better idea?

Thanks in advanced.
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do I need to declare CMR getter and setter methods in both Local Object?
Yes, you need to as explained in section 10.3.13 of the EJB 2.0 specification. That's what the book wanted to teach you on the 22nd day
[ December 10, 2004: Message edited by: Valentin Crettaz ]
 
it's a teeny, tiny, wafer thin ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic