Re: Delete a table content
Re: Delete a table content
- Subject: Re: Delete a table content
- From: Fabrice Pipart <email@hidden>
- Date: Wed, 7 Sep 2005 10:26:55 +0200
In short, do you just tell me I should ALWAYS use the EOF instead of raw sql to avoid having problems when I will have multiple instances? In fact after the discussion with Ken Anderson, I only kept raw sql for deleting all the rows of a table (this should not be a problem I think...). My memory problem has been solved by removing the invoice-invoiceitem relationship (wow that saves a lot of memory!). And finally you're right, I make such mistakes just because I don't really understand the caching behind EOs :-( I will give a look at "freshness explorer", I 'm sure it can help me!
Thanks you!
Fabrice
On Sep 6, 2005, at 1:38 PM, David Teran wrote:
Am 05.09.2005 um 17:48 schrieb Fabrice Pipart:
I think you are absolutely right. I gave up the idea to change the rows with raw SQL. Loosing the sync was too bad for the rest of the application and it did not make sense to have to refetch all the objects !
Sorry, but this is just a short term solution. If you want to do it right, you must -always- keep in mind that the database is out of sync. For example because you use multiple instances, the database is used by other systems and such cases. IMHO its just to naiv thinking that there is only one WO instance and only one system accessing the database so best is: always keep in mind that EOF caches Database information and always check if you need 'fresh' data for a certain action. I think the biggest problem for users is the fact that EOF caches and that they have absolutely no idea how to deal with that fact. Ignoring it just because one uses only a single instance means a lot of refactoring when you need to add just one additional instance or even just one additional EOF stack in the same instance. So its important to know the basics about data freshness and such things.
I know others have different opinion about that but all i can say to them is ' go back in sandbox and pray you never need multiple EOF stacks or multiple instances or multiple applications using on single database' because the reality is they will need the one or the other sooner or later ;-)
There is a neat demo app called 'freshness explorer' or something like this on connect.apple.com for download. It was published after WWDC 2004 and is a good starter to understand the caching stuff from EOF.
cheers, david
www.icconsulting.mc
International Corporate Consulting 25, Boulevard de Belgique MC - 98000 Monaco
T. +377 97982104 (direct) F. +377 97708807
|
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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