CM Qualifier (or Declared Qualifier) is not honoured in 100% cases
------------------------------------------------------------------

                 Key: CAY-1005
                 URL: https://issues.apache.org/cayenne/browse/CAY-1005
             Project: Cayenne
          Issue Type: Bug
          Components: Cayenne Core Library
    Affects Versions: 3.0
         Environment: ROP, LOCAL_CACHE, paging. Derby db.
            Reporter: Marcin Skladaniec
            Assignee: Andrus Adamchik


I have a suspicion that the qualifier set in the modeller is not always 
incorporated in query. 
Occasionally we are getting an exception like this (not only against this 
record) : 

CAUSE - [v.3.0-SNAPSHOT Jan 23 2008 23:16:39] Error resolving fault, no 
matching row exists in the database for ObjectId: <ObjectId:Node, 
id=323>org.apache.cayenne.FaultFailureException: [v.3.0-SNAPSHOT Jan 23 2008 
23:16:39] Error resolving fault, no matching row exists in the database for 
ObjectId: <ObjectId:Node, id=323>    at 
org.apache.cayenne.BaseContext.prepareForAccess(BaseContext.java:88) at 
org.apache.cayenne.CayenneDataObject.readProperty(CayenneDataObject.java:202)   
     at 
org.apache.cayenne.reflect.generic.DataObjectBaseProperty.readProperty(DataObjectBaseProperty.java:42)
       at 
org.apache.cayenne.util.ObjectDetachOperation$1.visitAttribute(ObjectDetachOperation.java:160)
       at 
org.apache.cayenne.reflect.generic.DataObjectAttributeProperty.visit(DataObjectAttributeProperty.java:50)
    at 
org.apache.cayenne.reflect.PersistentDescriptor.visitDeclaredProperties(PersistentDescriptor.java:339)
       at 
org.apache.cayenne.reflect.PersistentDescriptor.visitProperties(PersistentDescriptor.java:372)
       at 
org.apache.cayenne.util.ObjectDetachOperation.detach(ObjectDetachOperation.java:99)
  at 
org.apache.cayenne.access.ClientServerChannelQueryAction.toClientObjects(ClientServerChannelQueryAction.java:182)
    at 
org.apache.cayenne.access.ClientServerChannelQueryAction.interceptObjectConversion(ClientServerChannelQueryAction.java:142)
  at 
org.apache.cayenne.access.ClientServerChannelQueryAction.execute(ClientServerChannelQueryAction.java:70)
     at 
org.apache.cayenne.access.ClientServerChannel.onQuery(ClientServerChannel.java:82)
   at 
org.apache.cayenne.remote.service.DispatchHelper.dispatch(DispatchHelper.java:40)
    at 
org.apache.cayenne.remote.service.BaseRemoteService.processMessage(BaseRemoteService.java:153)

Model defines a qualifier for the Node entity : (isDeleted = null) or 
(isDeleted = 0). I checked the database and the Node which caused the trouble 
has isDeleted ==1, it should never be fetched in the first place. 

I was not able to isolate a test case, it is only my guess that there might be 
a bug. 




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to