> -----Original Message----- > From: Charlene Mitchell [mailto:charlene_ml@;yahoo.co.uk] > > That's a good suggestion which I didn't think of, > though I'm wondering how you could then get deeper > relations; I can only visualise it working for > something 2 levels deep. > > For example if I want to query on a Department and get > all Employees and their Addresses, I would do the > following (simplified here): > > 1. DepartmentLocal.getDepartmentNormalValue(); > 2. DepartmentNormal.getEmployeeLightValue(); > 3. EmployeeLight.getAddresses??How2GetValue??();
You can certainly mix and match light and normal value objects. For instance, an Address doesn't really need a conotation of Normal becuase it is atomic. That is to say, Address is probably a member of alot of unidirectional relationships and therefore doesn't really have any relationships that it knows about. Even if it does, you don't have to include them in the Address value object. So, Address could probably just have one value object, AddressValue. Then Employee Light and Normal value objects could both retrieve Address. The situation that I was referring to was more along the lines of a pure tree structure between the same EntityBean. Like, Type<----->*Type. Where every Type may have a parent Type, and every Type can have n subTypes. You could see how on Type.getNormal() would try to retrieve the entire tree because he would try to get his parent's Normal, which would get all the that parent's Normal, which would get that parent's Normal, plus every parent's children, etc... and that is where reentrancy becomes a problem. Michael ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
