Re: Fat relationships: i.e. user <--->> transactions
Re: Fat relationships: i.e. user <--->> transactions
- Subject: Re: Fat relationships: i.e. user <--->> transactions
- From: "Pierce T. Wetter III" <email@hidden>
- Date: Thu, 6 Dec 2007 14:58:41 -0700
On Dec 5, 2007, at 3:26 PM, Mike Schrag wrote:
1. addToBothSides() should skip the inverse if it isn't faulted.
Yes! I keep meaning to look into this .. I seem to recall there
were several attempts on the wikibook (or wodev) that show how to do
this, but they all had caveats with them. I suspect this is a
slippery change to make, but it makes total sense. Log a bug
against 5.4 -- It's not a black hole anymore :)
Yeah, at the very least it could look for the fault on the object,
and look for a snapshot in the database context and if its not there,
no harm no foul. Hmmm... Or would it? Because if it had to fetch the
relationship later on in the code, before the saveChanges() writes it
out to the database, it wouldn't have the new object in it.
So fetching is safe, because then you can create the superset.
The only safe solution I can see is a SparseArrayFault fault
handler class, which means a new setting on the to-many relationship
"Sparse Relationship". That would tell EOF to use a different Array
fault handler class.
So I'm going to hold off filing the bug reporter item until I think
about the problem a bit...
2. I wish qualified/sorted relationships were built into EOF.
This would mean:
I've always wanted this too ... Let the framework work it out under
the covers to do caching + qualifiers. There's no reason it can't.
Hmmm... This could be done via magic in the templates perhaps.
Pierce
_______________________________________________
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