You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2015/04/30 08:44:06 UTC
[jira] [Comment Edited] (CAY-1902) Implement resolving Db paths for
DataObjects
[ https://issues.apache.org/jira/browse/CAY-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520950#comment-14520950 ]
Andrus Adamchik edited comment on CAY-1902 at 4/30/15 6:43 AM:
---------------------------------------------------------------
> Doesn't the cached snapshot HAVE to exist in order for optimistic locking to work?
> Is the original snapshot for locking stored somewhere else?
We do optimistic locking at the Obj* level , so no DB snapshot is needed.
> If I remove the snapshot by calling objectStore.unregisterNode then the object becomes
> "transient" and has no objectId so I can't evaluate db paths on it.
> So it seems like if the snapshot is not in the cache then you can't evaluate
> db path expressions against it in memory.
Then you need to get the snapshot from DB. BTW, I am rethinking the whole business of unsetting ObjectId for unregistered objects. I think this is wrong and we should preserve the id of transient objects that were previously registered with ObjectContext and then were evicted for one or another reason.
was (Author: andrus):
> Doesn't the cached snapshot HAVE to exist in order for optimistic locking to work?
> Is the original snapshot for locking stored somewhere else?
We do optimistic locking on Obj* level, so no DB snapshot is needed.
> If I remove the snapshot by calling objectStore.unregisterNode then the object becomes
> "transient" and has no objectId so I can't evaluate db paths on it.
> So it seems like if the snapshot is not in the cache then you can't evaluate
> db path expressions against it in memory.
Then you need to get the snapshot from DB. BTW, I am rethinking the whole business of unsetting ObjectId for unregistered objects. I think this is wrong and we should preserve the id of transient objects that were previously registered with ObjectContext and then were evicted for one or another reason.
> Implement resolving Db paths for DataObjects
> --------------------------------------------
>
> Key: CAY-1902
> URL: https://issues.apache.org/jira/browse/CAY-1902
> Project: Cayenne
> Issue Type: Improvement
> Components: Core Library
> Affects Versions: 4.0.M2
> Reporter: John Huss
> Assignee: John Huss
> Priority: Minor
> Fix For: Undefined future
>
> Attachments: 0001-CAY-1902-Implement-resolving-Db-paths-for-DataObject.patch, 0001-Implement-db-path-evaluation-in-memory.patch
>
>
> Expressions using db paths don't support in-memory evaluation against DataObjects (there is a TODO in the code).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)