Hello, I have a small concept app I m building with Seam. I m trying to figure out what is the best way to handle a scenario where a number of classes which have a parent/child relationship to each other are also properties of a certain class.
To illustrate, here is a small example where this scenario may occur. Lets say we have a Address class that looks like this: | @Entity | class Address { | private Country country; | private State state; | private City city; | } | | @Entity | class Country { | private State[] state; | } | | @Entity | class State { | private Country country; | private City[] city; | } | | @Entity | class City { | private State state; | } | | The idea here is that these classes are all properties of the Address class, yet all these properties have a parent/Child relationship to one another. Classes Country/State/City maybe used as: - Drop down menus - in drill down screens from Country->State->City->AddressList - Constraints on on the Address class. (Entering a City that is not part of a certain State). I d really like to hear peoples thoughts on this matter, I been trying to identify documentation from various sources to make sure this is a good idea or not, but havent seen this scenario yet, wich gives me doubts about its viability. Would it be better to use a Categorize class or something to store association as opposed to having the association on the object in this case? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918845#3918845 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918845 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user