• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can an entity bean have a CMR to itself?  RSS feed

 
Bill Pugh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been working on some EJB examples, and been having a very frustrating time with CMR.
In particular, I had an example with an PersonBean, and a container managed relationship called spouse, defined as a 1-1 relationship from a Person to a Person.
Both I, and a bunch of students in my class, spent a huge amount of time trying to get this to work in Sun's 1.3.1 RI, and have completely unsuccessful.
Eventually, I was able to get the same functionality by adding an IndirectPersonBean, and having a 1-1 CMR named indirect from Person to IndirectPerson, and a 1-1 CMR named spouse from IndirectPerson to Person.
So we have been able to get CMR to work. Just not from a bean to itself.
Is this a bug in the Sun 1.3.1 RI, or a limitation of the spec?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This certainly works in WebSphere, so I'd suspect it's an RI limitation.
Kyle
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!