| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
My 2¢: The following code snippet works for me in most cases, but, it doesn't work if the app tries to access the to-many relationship prior to saving the changes to the database. Such access would fire the fault which would not contain the added object because it hadn't been saved to the DB, yet it should be in the to-many relationship in the app's object graph because it had been added. public void holdFaultWhenAdding(EOEnterpriseObject eo, NSArray toManyArray) { if(!EOFaultHandler.isFault(toManyArray)) { NSMutableArray array = (NSMutableArray) toManyArray; this.willChange(); array.addObject(eo); } } When using the above method to hold faults, you’ll need to replace addToRelationship in your EO’s custom class. public void addToProducts(Product product) { this.holdFaultWhenAdding(product, this.products()); } Does anyone have any experience with modeling the relationship both ways and simply turning off the to-many side as a class property for the _user_ side of a Web site but leaving the relationship as a class property for the_admin_ side? I'm just thinking out loud, but it seems that both the _user_ and _admin_ apps could use the same EO Model but the _user_ app could load the model and then dynamically turn off the to-many relationship as a class property during run time. - Joe On Dec 5, 2007, at 09:53:22, Patrick Middleton wrote:
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden This email sent to email@hidden
| References: | |
| >Java Packages for Dummies (From: Owen McKerrow <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Chuck Hill <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Owen McKerrow <email@hidden>) | |
| >Re: Java Packages for Dummies (From: "Pierce T. Wetter III" <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Mike Schrag <email@hidden>) | |
| >Re: Java Packages for Dummies (From: David Avendasora <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Anjo Krank <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Mike Schrag <email@hidden>) | |
| >Re: Java Packages for Dummies (From: Anjo Krank <email@hidden>) | |
| >Fat relationships: i.e. user <--->> transactions (From: "Pierce T. Wetter III" <email@hidden>) | |
| >Re: Fat relationships: i.e. user <--->> transactions (From: Patrick Middleton <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.