• 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: Error When Deleting from different session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error When Deleting from different session


  • Subject: Re: Error When Deleting from different session
  • From: Max Ribuoli <email@hidden>
  • Date: Sat, 11 Jun 2005 00:29:47 +0200

Hi, It's seems the same problem encountered by a friend of mine.
He has solved it using the class ERXSharedEOLoader from Wonder frameworks (http://wonder.sourceforge.net/, the problem is dued by shared objects in model (read-only entities).


Here the comment in the class file to explain the problem:

Note: This is a direct port of Kelly Hawks' ObjC SharedEOLoader. Only enhanced it to use the log4j system.

Kelly's description of the problem:

Now on to the problem. Without source code and symbols, I can't say exactly
where things go wrong, but the bug occurs when:
1) you have an application with more than one model in a model group
2) there are cross-model relationships
3) The first object you fetch from the database is from a model that doesn't
contain shared objects. What seems to be happening is EOF's shared EO loader goes like this:
1) request comes in for object from model #1
2) shared EOs are loaded for model #1 (none).
3) object from step #1 touches are relationship to an entity in model #2.
4) shared EOs are loaded for model #2.
For some reason, this is too late. All the shared EOs for all models need to
// be loaded at once.
The bug manifests itself as:
Aug 13 00:07:22 FooApplication [24239] *** Uncaught exception:
<NSInternalInconsistencyException> sqlStringForKeyValueQualifier:: attempt
to generate SQL for EOKeyValueQualifier 0x441298
'(someRelationship.someAttribute = 'someValue')' failed because attribute
identified by key 'someRelationship.someAttribute' was not reachable from
from entity 'someEntity'


My suggestion is to implement the Wonder framework into your WO application and call:

ERXSharedEOLoader.patchSharedEOLoading();

in the Application constructor.

Max Ribuoli

On Jun 10, 2005, at 03:47, Owen McKerrow wrote:


Hi All,

Im posting this to both the WO and OpenBase lists as Im not sure exactly where the problem is coming from.
I have a table called Grants which is having issues when I delete from it. That is to say, if I create a Grant I can delete it happily if its in teh same session. If I come back in with a new session I get the following error :


java.lang.IllegalStateException: sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (_eofInv_jStudentGrant_person.grant.rowID = (java.math.BigDecimal)'2') failed because attribute identified by key '_eofInv_jStudentGrant_person.grant.rowID' was not reachable from from entity 'External'
02:12:00AM


sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (_eofInv_jStudentGrant_person.grant.rowID = (java.math.BigDecimal)'2') failed because attribute identified by key '_eofInv_jStudentGrant_person.grant.rowID' was not reachable from from entity 'External'


As I said Im not sure if this is a WO problem or an OpenBase one, but I have no idea where "_eofInv_jStudentGrant_person.grant.rowID" is coming from. Is this just WO's way of saying "jStudentGrant_person.grant.rowID" i.e. its sticking the "_eofInv" in the front of it, or is there a hidden table in OpenBase which has this attribute in it ? Im thinking its WO.


And why does this error not happen if I have delete the grant in the same session as I made it ?

Thanks
Owen McKerrow
WebMaster, emlab
http://emlab.uow.edu.au

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"As of tomorrow, employees will only be able to access the building using individual security cards. Pictures will be taken next Wednesday employees will receive their cards in two weeks."
- "Dilbert Quotes" Winner, Fred Dales, Microsoft Corp


_______________________________________________
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





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

References: 
 >Error When Deleting from different session (From: Owen McKerrow <email@hidden>)

  • Prev by Date: Re: disposing components
  • Next by Date: Authorize.net Credit Card Authentication
  • Previous by thread: Re: Error When Deleting from different session
  • Next by thread: How to have a WOHyperlinks Functionality inside a Java String
  • Index(es):
    • Date
    • Thread