• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Optimization - Share All Objects -> Register Database Context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Optimization - Share All Objects -> Register Database Context?


  • Subject: Re: Optimization - Share All Objects -> Register Database Context?
  • From: Ian Joyner <email@hidden>
  • Date: Thu, 11 Aug 2005 13:51:51 +1000

Thanks. I set cache in memory a long time ago, hoping it would have the effect I am now trying to achieve. For this application, read only is fine because I just set the values in the DB with SQL, but if I want to write a small application for this (for localization), does this mean it won't work with this model?

However, after getting past the last problem, I now get:

[2005-08-11 13:41:40 EST] <WorkerThread13> java.lang.IllegalArgumentException: EOEditingContext: initializeObject: attempt to initialize object with global ID _EOIntegralKeyGlobalID[Title (java.lang.Integer)2] that exists in a shared context via a non-shared context. The object model may have a relationship from a shared entity to a non-shared entity. Disable or remove the relationship from the model.
at com.webobjects.eocontrol.EOEditingContext.refaultObject (EOEditingContext.java:4020)
at com.webobjects.eodistribution.EODistributionContext._snapshotsReleased (EODistributionContext.java:705)


I think they mean "may NOT have". However, this entity does not have any relationships to a non-shared EC, so I think they mean "perhaps has", but since it does not, what other explanations are there?

Sorry to post this in a hurry, but I have a short day today, and I'm hoping to get this fixed by tomorrow (testers are now complaining that it's too slow).

Thanks
Ian Joyner
Sportstec

On 11/08/2005, at 1:20 PM, email@hidden wrote:

Hi Ian;

This is my approach which seems to do the trick. You will find that in EO modeller, in the "Advanced Entity Inspector" there are two check boxes;

    [X] Read Only
    [X] Cache in Memory

Make sure those two are checked for your reference entities (eg: "usertype", "currencytype" etc...) and then *ensure* that there are no relationships from the reference entities to other entities within your model. So for example, the following is correct;

    ABCUser --userType--> ABCUserType

...and the following is not correct...

    ABCUser <--users-- ABCUserType

Once you have done this, it appears to "just work".

cheers.


I want to load this only once, so have set "Share all objects" in EOModeler's Shared entity inspector for the parent class (I have also tried all the subclasses as well). In the FetchAll spec, I have set the "Perform deep inheritance fetch" option. This has caused all the subclasses to be loaded on the server side, but as soon as they are loaded, I get:

___
Andrew Lindesay
www.lindesay.co.nz
+64-21-47-0929


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40sportstec.com


This email sent to email@hidden



_______________________________________________ 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
References: 
 >Re: Optimization - Share All Objects -> Register Database Context? (From: email@hidden)

  • Prev by Date: Re: Optimization - Share All Objects -> Register Database Context?
  • Next by Date: Re: Re: Optimization - Share All Objects -> Register Database Context?
  • Previous by thread: Re: Optimization - Share All Objects -> Register Database Context?
  • Next by thread: Re: Re: Optimization - Share All Objects -> Register Database Context?
  • Index(es):
    • Date
    • Thread