M:N question

2003-08-08 Thread bian . xiaochun
Hello,
I have a emergent question.Here I have designed 3 tables:User 
Domain Role and I have 

   implemented User - Role M:N relation by add a table User_Role 
including the PK of table

   User  Role and write repository xml file(collection-descriptor,
fk-pointing-to-this-class

   fk-pointing-to-element-class).Now I want to add a column of PK of 
Domain in table 
 
   user_role,which means a user in a domain have a role,who can tell 
me how to implement it,

thanks a lot.

 




m:n Question

2003-03-19 Thread Michael Duffy

I've got an m:n association that's causing me a
problem.

Let's say I have two Java classes, A and B, that have
underlying database tables and an m:n association
between them.  Both A and B have members of type
java.util.Collection that maintain references to the
other.

I have a constructor for A that allows me to create an
empty collection of B references.  

When I test creating and storing an instance of class
A with an empty collection of B references OJB throws
a java.util.NoSuchElementException: Thrown by the
nextElement method of an Enumeration to indicate that
there are no more elements in the enumeration.

Does OJB not allow me to persist an instance of class
A which has no references to class B, or have I made
another newbie mistake?   Thank you. - MOD


__
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]