Yes, that could be the reason.

The field in table A can hold a PK of table B, C, or D, but I don't know, so I have to test each of them.

I thought that I could do a.getB(), then a.getC() then a.getD() until I get a non-null result.

Wernke


On 2011-07-19 16:45, Andrus Adamchik wrote:
Hi,

Very often this is caused by DB referential integrity violation in the DB. E.g. you have a non-NULL FK that has no corresponding PK. Actually we are working on https://issues.apache.org/jira/browse/CAY-1437 right now that would allow to have a custom fault resolution strategy, so the case above should be handled by setting up a special strategy that expects possible ref integrity issues.

Cheers,
Andrus


On Jul 19, 2011, at 4:18 PM, Wernke zur Borg wrote:
  
Sorry, I forgot to mention this is with Cayenne 3.1M2.

W.

On 2011-07-19 15:16, Wernke zur Borg wrote:
    
Hi,

this is similar to https://issues.apache.org/jira/browse/CAY-1379.

I have a to-one relationship from table A to B. When I call b = a.getB()
I am sometimes getting a non-null result even though a corresponding row
does not exist. I am getting the subject error when I call
b.getSomeAttribute().

Any clue about this?

Thanks, Wernke
      


This email (including any attachments) may contain confidential and/or privileged
information or information otherwise protected from disclosure.  If you are not the
intended recipient, please notify the sender immediately, do not copy this message
or any attachments and do not use it or any purpose or disclose its content to any
person, but delete this message and any attachments from your system.
RHEA System S.A. (RHEA) disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.

If a Non Disclosure Agreement (NDA) exists between RHEA and the receiving
organization, then all contents shall be considered proprietary and covered under
the NDA.



    

  


--
Wernke zur Borg
Rhea System S.A.
Robert-Bosch-Str. 7
64293 Darmstadt / Germany
Tel. +49-6151-872-4700



This email (including any attachments) may contain confidential and/or privileged
information or information otherwise protected from disclosure.  If you are not the
intended recipient, please notify the sender immediately, do not copy this message
or any attachments and do not use it or any purpose or disclose its content to any
person, but delete this message and any attachments from your system.
RHEA System S.A. (RHEA) disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.

If a Non Disclosure Agreement (NDA) exists between RHEA and the receiving
organization, then all contents shall be considered proprietary and covered under
the NDA.

Reply via email to