Hi all... it occurred to me that it would really make sense to add a cardinality rule into the Torque system. it could be at its most basic implementation an optional attribute of a foreign-key tag:
<foreign-key ... cardinality="cardinalityNumber".../> where cardinalityNumber is one of: oneToOne oneToMany zeroToOne zeroToMany Having simple text strings like this make it easy to implement and it's quite readable and also easy to validate in the DTD. Of course if you wanted to go hog wild, you could use more conventional UML cardinality symbols: 1..1 1..* 0..1 0..* This latter way makes away for ranges, which are less common but could be very useful as well (1..2, etc). No, which way around would it be? The check code for this would be in the form of assertions: org.apache.torque.[subsomething i guess].CardinalityException. Comments anyone? I could imagine it's a pretty easy feature to add, and well-worth on the balance of effort required to add it. I'd volunteer to see if I can sneak it into Torque 2.2... _________________________________________________________________ Descargue GRATUITAMENTE MSN Explorer en http://explorer.yupimsn.com/intl.asp -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
