You can only use a foreign key in one relationship. See the big warning's here: http://docs.transfer-orm.com/wiki/Transfer_Configuration_File.cfm#manytoone
You've set up a relationship that loops back onto itself... this should actually be picked up by Transfer, and give you a decent error, but it doesn't :P You can do recursive relationships, but not with the same foreign key. That should have read: So maybe stick with an order knowing about a user, *as* a user could have infinite orders, and that could cause performance issues. Some more notes on o2m vs m2o can be read here: http://docs.transfer-orm.com/wiki/What_is_the_difference_between_ManyToOne_and_OneToMany.cfm Mark On Mon, Jun 1, 2009 at 11:48 AM, Matthew <[email protected]> wrote: > > Hi Mark > > Sorry I don't understand what is wrong with my FK's? > > Also, this sentence doesn't make sense: So maybe stick with an order > knowing about a user, and a user could have infinite orders, and that > could cause performance issues. > > Cheers > Matthew > > On Jun 1, 11:18 am, Mark Mandel <[email protected]> wrote: > > Oh I see it now, you have used the Foreign key 'userid' twice. You can > only > > use it once. > > > > So maybe stick with an order knowing about a user, and a user could have > > infinite orders, and that could cause performance issues. > > > > Mark > > > > > > > > On Mon, Jun 1, 2009 at 9:48 AM, Matthew <[email protected]> > wrote: > > > <object name="User" table="testUser"> > > > <id name="userId" type="numeric"></id> > > > <property name="firstName" type="string" /> > > > <onetomany name="Orders" lazy="true"> > > > <link to="Order" column="userId" /> > > > <collection type="array"></collection> > > > </onetomany> > > > </object> > > > <object name="Order" table="testOrder"> > > > <id name="orderId" type="numeric"></id> > > > <property name="userId" type="numeric" /> > > > <property name="totalPrice" type="numeric" /> > > > <property name="deliveryName" type="string" /> > > > <manytoone name="OrderUser"> > > > <link to="User" column="userId" /> > > > </manytoone> > > > </object> > > > > -- > > E: [email protected] > > W:www.compoundtheory.com > > > -- E: [email protected] W: www.compoundtheory.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
