Two ideas come to mind. 1. Use a transaction in service A to save object A for table A and then call serviceB.saveB(b) inside that transaction.
2. Use ColdSpring's AOP to start a transaction when are you saving the object for table A. This is the more complicated to setup option but the most transparent in the code. If are not familiar with AOP then I wouldn't recommend this method. --Kurt On Tue, Mar 22, 2011 at 3:31 PM, Brian <[email protected]> wrote: > I am in the process of incorporating coldspring into a web > application. My question is this, I have three tables call them table > A,B, and C. Table A is dependent on B and table B is dependent on C. > This means on an insert to table A I would have to create a record in > table C, get that ID, create the record in table B, get the ID and > finally create the record in table A. If each table is being > represented as a Service bean in my coldspring.xml is there some way > to define this table/bean dependency in coldspring or is it easier to > handle this as separate calls to listener methods in the machII.xml. > > -- > To post to this group, send email to [email protected] > For more options and to unsubscribe, visit this group at > http://groups.google.com/group/mach-ii-for-coldfusion?hl=en > > SVN: http://svn.mach-ii.com/machii/ > Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/ > -- To post to this group, send email to [email protected] For more options and to unsubscribe, visit this group at http://groups.google.com/group/mach-ii-for-coldfusion?hl=en SVN: http://svn.mach-ii.com/machii/ Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/
