Hi, 

Just trying to understand this issues, maybe I have missed something....

I created a many-to-many relationship in ORM (see below). When I add an account 
to a scape i.e. addAccount(account) the second time I add the 'same' account to 
the scape I 'should' get an error because of the composite key.

However, ORM happily adds it!
 
Scape.cfc
property name="Accounts" singularname="Account" fieldtype="many-to-many" 
cfc="pAccount" fkcolumn="scapeID" inversejoincolumn="accID"  
linktable="pLinkScapesAccount";

Account.cfc
property name="Scapes" singularname="Scape" fieldtype="many-to-many" 
cfc="pScape" fkcolumn="accID" inversejoincolumn="scapeID"  
linktable="pLinkScapesAccount";

What should I have done? There should never be two composite keys the same in 
the link table so why does ORM let me do this? Is there a way to force the 
correct behaviour?


Thanks for you help

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346644
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to