Hi Henrique,
On 21/02/2014, at 1:35 PM, Henrique Prange <[email protected]> wrote:
> Does it work for you? As soon as you validate this SNAPSHOT I’m going to cut
> the 1.2.3 release.
Unfortunately, no change. To give you a little more detail, I have a base
class User in a framework, and an application-level partial entity HMUser.
There's an entity Job with a to-one relationship 'creator' in the model to
HMUser so that HMUser has the inverse 'jobs' relationship. This all works fine
within the running application. In testing, calling job.setCreator(user) for
some Job job and some User user fails when it gets to setting that inverse
relationship:
<com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException message
'<net.logicsquad.access.model.User 0x35c4795e> valueForKey(): lookup of unknown
key: 'jobs'.
This class does not have an instance variable of the name jobs or _jobs, nor a
method of the name jobs, _jobs, getJobs, or _getJobs' object
'<net.logicsquad.access.model.User pk:"null">' key 'jobs'>
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.handleQueryWithUnboundKey(NSKeyValueCoding.java:1377)
at
com.webobjects.eocontrol.EOCustomObject.handleQueryWithUnboundKey(EOCustomObject.java:1545)
at
er.extensions.eof.ERXGenericRecord.handleQueryWithUnboundKey(ERXGenericRecord.java:1086)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:494)
at
com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:894)
at
com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.java:1498)
at
er.extensions.partials.ERXPartialGenericRecord.valueForKey(ERXPartialGenericRecord.java:92)
at
er.extensions.eof.ERXGenericRecord$InverseRelationshipUpdater.takeStoredValueForKey(ERXGenericRecord.java:1490)
at
er.extensions.eof.ERXGenericRecord.takeStoredValueForKey(ERXGenericRecord.java:1259)
at net.logicsquad.hydromaster.model.core._Job.setCreator(_Job.java:279)
at
net.logicsquad.hydromaster.test.model.core.JobTest.jobMustHaveUniqueJobID(JobTest.java:68)
The stack trace is correct in that User doesn't have that key, but the
properties of HMUser should have been merged so that it all just works,
shouldn't they?
If what I'm trying to describe isn't clear, I'd be happy to put together a
minimal test project—let me know. Alternatively, if it looks like I'm misusing
partials or WOUnit, let me know that as well!
> PS.: Sorry for taking so long to fix this problem in the proper way.
Thanks for working on it at all!
--
Paul Hoadley
http://logicsquad.net/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]