• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Many-Many CMR -> link table not populating

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have a scenario where there is a many to many unidirectional relationship. i.e. ReportEJB has many FieldEJB and FieldEJB can be associated with many ReportEJB. Reports need to know about fields but not the other way around

I have followed numerous examples on how to configure both the jbosscmp file and the ejb-jar file in order for two beans to have a many-many uni-directional relationship. I think i have done this succesfully as no errors are being thrown.

All my tables are building accordingly and i have my abstract accessors specified in both beans concerned but when i go to create a new report bean the link table is not populated.

Does it matter that FieldEJB is already populated and has read-only access?

Is there any examples out there with the actual manipulation of the data in the database as opposed to how to configure the META-INF files.

Also can i use remote beans in these relationships or does it have to be local???

please help
 
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only local interfaces may be used with relationships, and I don't think FieldEJB being read-only should make a difference since ReportEJB manages the relationship.

All of the many-to-many relationships I've used have required attributes on the relations themselves, forcing me to model the relation table as a bean and use two one-to-many relationships. Can you post the Java code that adds a Field to a Report?
 
Fiona Healy
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using POJOs to pass beans over and back to the client so this is the client/session/bean code in order of the flow of data
I think code should be ok but maybe its my configuration files that are the problem. I have attached the following from the ejb-jar file



...
 
Fiona Healy
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forgot to add teh stack trace


 
reply
    Bookmark Topic Watch Topic
  • New Topic