Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Many-Many CMR -> link table not populating

 
Fiona Healy
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
I forgot to add teh stack trace


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