Have you checked out Hibernate? It does a lot of what you ask for :). (and then some). Plus it's LGPL.
Martin Tuesday, July 1, 2003, 5:31:40 PM, you wrote: SM> Hi SM> I am struggling with the best approach to take with my first Struts SM> application and wondered if I could get some voices of experience. I have a 1->>m relationship (Supplier -> Products) that I wish to represent SM> in a maintenance application. SM> You can Add or Edit a Supplier, and then within this Add or Edit you can Add SM> or Edit Products. SM> My persistence layer provides a Supplier Data Transfer Object(DTO) SM> representing the Supplier->Products (The Supplier holds a Collection of SM> Product DTO's). SM> At the moment I have ActionForm for Supplier held in session scope SM> containing a collection of Product ActionForms. Depending on Add or Edit SM> these are populated from the Supplier DTO. SM> When a Save is finally executed I create a Supplier DTO and populate it from SM> the Supplier ActionForm and collection of Product ActionForms. The DTO is SM> passed to the persistence layer. SM> I still have logic in the Action classes that I do not like, for example the SM> Save determines whether to call insert() or update() on my persistence SM> layer. I think I need a Workflow type class where a method Save() will SM> determine whether to call insert() or update(). SM> So, any comments of my current approach? SM> Suggestions for improvements? SM> Thanks SM> Shane SM> Shane Mingins SM> Analyst Programmer SM> Assure NZ Ltd SM> Ph 644 494 2522 SM> --------------------------------------------------------------------- SM> To unsubscribe, e-mail: [EMAIL PROTECTED] SM> For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]