wow I am not sure what to say. Other than thanks. On Tue, Mar 24, 2009 at 10:31 AM, Brian Kotek <[email protected]> wrote: > Since it seems highly unlikely that both your Firm and your User have the > same primary key, my guess is you're loading a firm with an invalid id, > which creates a new Firm, and then adding it to the User and trying to save > the User without saving the new Firm. > > On Tue, Mar 24, 2009 at 1:19 PM, spiraldev <[email protected]> wrote: >> >> here is my error that I am getting >> >> An unhandled exception has occurred. Please look at the diagnostic >> information below: >> Type transfer.ManyToManyNotCreatedException >> Message A ManyToMany TransferObject child is not persisted. >> Detail In TransferObject 'security.User' manytomany 'firm.firm' has >> not been persisted in the database. >> >> >> here is my user object >> <object name="User" table="users" decorator="model.security.User"> >> <id name="userID" column="userid" type="UUID" >> generate="true"/> >> <property name="username" type="string" >> column="username" /> >> <property name="email" type="string" column="email" >> /> >> <property name="password" type="string" >> column="password" /> >> <property name="firstName" type="string" >> column="firstName" /> >> <property name="lastName" type="string" >> column="lastName" /> >> <property name="officePhone" type="string" >> column="officePhone" /> >> <property name="mobilePhone" type="string" >> column="mobilePhone" /> >> <property name="isConfirmed" type="boolean" >> column="isConfirmed" /> >> <property name="isActive" type="boolean" >> column="isActive" /> >> <manytomany name="Firm" table="userFirms" >> lazy="true"> >> <link column="userIDFK" >> to="security.User"/> >> <link column="firmIDFK" >> to="firm.firm"/> >> <collection type="array" /> >> </manytomany> >> </object> >> >> >> and here is my firm object >> >> <object name="firm" table="firm" decorator="model.firm.firm"> >> <id name="firmID" type="UUID" generate="true"/> >> <property name="firmName" type="string" >> column="firmName" /> >> <property name="address1" type="string" >> column="address1" /> >> <property name="address2" type="string" >> column="address2" /> >> <property name="city" type="string" column="city" >> /> >> <property name="state" type="string" column="state" >> /> >> <property name="zip" type="string" column="zip" /> >> <property name="country" type="string" >> column="country" /> >> <property name="url" type="string" column="url" /> >> <property name="officePhone" type="string" >> column="officePhone" /> >> <property name="faxNumber" type="string" >> column="faxNumber" /> >> >> </object> >> >> and here is my >> Code >> <cfset oUser = getColdBoxOCM().get("Transfer").get >> ("security.User",'38F46204-C504-C3CC-AB7B819CD1D02C25')> >> <cfset oFirm = getColdBoxOCM().get("Transfer").get >> ("firm.firm",'38F46204-C504-C3CC-AB7B819CD1D02C25')> >> <cfset oUser.ADDFIRM(oFirm) /> >> <cfset getColdBoxOCM().get("Transfer").save(oUser) /> >> >> >> I am not sure what I am missing please help. >> > > > > >
--~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en -~----------~----~----~----~------~----~------~--~---
