Thomas Aagaard Jensen <mailto:[EMAIL PROTECTED]> once said: > I'm trying to make a unidirectional 0-1 relation but something is > wrong.
To be clear, Inode has 0 or 1 Usr, and Usr can have many Inodes? > The error tells me that a generated finder 'findByUsr' on > Inode has returned more than one value when expecting only one. I > have only defined an ejb.relation on the Inode bean. Should I also > define the realtion on the Usr bean? No, because then it would not be unidirectional. Though you can certainly do this, it is not necessary. > /** > * @return owner - this Inodes owner > * > * @ejb.relation > * name="inode-usr" > * role-name="inode-references-usr" > * target-ejb="Usr" As it's unidirectional, you need to specify all of the target-* tags: * @ejb.relation * name="Inode-Usr" * role-name="Inodes-have-a-Usr" * cascade-delete="yes" -- Delete Inodes when Usr is deleted? * target-ejb="Usr" * target-role-name="Usr-has-many-Inodes" * target-cascade-delete="no" -- Delete Usr with Inodes? * target-multiple="yes" -- Usr has multiple Inodes Feel free to futz with the role names and such. The error your getting is in reference to a finder. Did you create that finder? I was not aware the WebLogic generates its own *named* finders (if it generates any at all). If that is your finder, make sure it's return type is "java.util.Collection" and not "your.package.InodeLocal". David Harkness Sr. Software Engineer Sony Pictures Digital Networks (310) 482-4756 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user