I'm Surprised I Don't Know The Answer to This
I'm Surprised I Don't Know The Answer to This
- Subject: I'm Surprised I Don't Know The Answer to This
- From: Kevin Hinkson <email@hidden>
- Date: Tue, 07 Jul 2015 21:17:19 +0000
- Feedback-id: 1.us-east-1.Kh9OvO4TNzr8rtyl4O9kjiRjGbw+MJ/D/qbZ+czV77c=:AmazonSES
Hi,
If I have two EO’s that are modelled with a many to many relationship, and I add an object to the relationship without checking if it is in there first — does it check if the relationship already exists? Better yet, does it check if it happens across models (same database)?
Eg:
Card and Account (Eos) have the relationship described above.
card.addToAccounts(account) calls includeObjectIntoPropertyWithKey(account, “accounts”) in my _Card.java. Would this trigger the check? I looked at the code in includeObjectIntoPropertyWithKey and it appears to check but I was getting a very strange error which suggested this was a problem. Essentially I was getting an error where an insert was being attempted for a to-many relationship that had already occurred.
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden