Grokbase Groups Cayenne dev May 2007
prefetch can set state to modified

Key: CAY-788
Project: Cayenne
Issue Type: Bug
Components: Cayenne Core Library
Affects Versions: 2.0 [STABLE]
Environment: cayenne-2.0.2, java 5, a mac, PostgreSQL and Derby
Reporter: Tore Halset

I have a situation where adding a prefetch to a simple select query set the persistence state to "modified" even though they are not modified. Here are the stacktrace to where the state are set to modified:

at org.apache.cayenne.access.ObjectStore.registerDiff(
at org.apache.cayenne.access.DataContext.propertyChanged(
at org.apache.cayenne.CayenneDataObject.writeProperty(
at org.apache.cayenne.access.PrefetchProcessorNode.linkToParent(
at org.apache.cayenne.access.ObjectTreeResolver$DisjointProcessor.startDisjointPrefetch(
at org.apache.cayenne.query.PrefetchTreeNode.traverse(
at org.apache.cayenne.query.PrefetchTreeNode.traverse(
at org.apache.cayenne.access.ObjectTreeResolver.resolveObjectTree(
at org.apache.cayenne.access.ObjectTreeResolver.synchronizedObjectsFromDataRows(
at org.apache.cayenne.access.DataDomainQueryAction.interceptObjectConversion(
at org.apache.cayenne.access.DataDomainQueryAction.execute(
at org.apache.cayenne.access.DataDomain.onQuery(
at org.apache.cayenne.util.ObjectContextQueryAction.runQuery(
at org.apache.cayenne.access.DataContextQueryAction.execute(
at org.apache.cayenne.access.DataContext.onQuery(
at org.apache.cayenne.access.DataContext.performQuery(

Here are the query:
DataContext ctxt = createDataContext();
SelectQuery query = new SelectQuery(A.class);
List daos = ctxt.performQuery(query);

The relationship is a one-to-one and the primary key are compond of one String and 3 ints.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
postedMay 8, '07 at 9:38a
activeMay 8, '07 at 9:38a

1 user in discussion

Anonymous: 1 post



site design / logo © 2021 Grokbase