Re: Modeling an optional to-one relationship
Re: Modeling an optional to-one relationship
- Subject: Re: Modeling an optional to-one relationship
- From: Mark Ritchie <email@hidden>
- Date: Fri, 15 Jan 2010 09:44:46 -0800
Hi Lon,
On 14/Jan/2010, at 2:21 PM, Lon Varscsak wrote:
> heh, it's not. :) I also don't believe that sometimes having an
> optional to-one is always a "thing to fix". However, I do understand
> now that EOF doesn't handle this case much better than it did in WO4.
Personally, I like the way that EOF is handling the case. It works for reading and it correctly warns you when you attempt to change something that never existed in the first place. There is also programatic access to detect the case before you attempt to saveChanges so you can gracefully handle things before hitting a exception. However, each to their own! ;-)
Here's the example code which I was working with:
Attachment:
Application.java
Description: Binary data
Setup a new project with a copy of the Movies.eomodeld, change all entity classes to EOGenericRecord, setup a database with the tables and point the connection dictionary at it. It should be good to go. Oh, you should also set the WOAutoOpenInBrowser false since there's no point in opening the default main component.
Please let me know how this works for you!
Mark
_______________________________________________
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