cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ari Maniatis (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-467) Prefetched Query Refresh Bug for refreshing entities of query table only one time
Date Mon, 15 Feb 2016 09:41:18 GMT

     [ https://issues.apache.org/jira/browse/CAY-467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ari Maniatis closed CAY-467.
----------------------------
    Resolution: Incomplete

After 10 years, this task isn't likely to be looked at. There isn't really enough to go on
and understand what is being reported here.

> Prefetched Query Refresh Bug for refreshing entities of query table only one time
> ---------------------------------------------------------------------------------
>
>                 Key: CAY-467
>                 URL: https://issues.apache.org/jira/browse/CAY-467
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 1.2 branch
>         Environment: Windows XP, hp compaq nc6120, 1 GB DDR Ram, 40 GB HDD,cayenne-1.2-dev-2006-2-23,Ms
Sql 7.0
>            Reporter: emre
>         Attachments: ASF.LICENSE.NOT.GRANTED--HGYSMap.map.xml, ASF.LICENSE.NOT.GRANTED--HGYSNode.driver.xml,
ASF.LICENSE.NOT.GRANTED--cayenne.xml
>
>
> PersonelCard = Object Entity;
> badgeNo = attribute of PersonelCard;
> PersonelRel = Relationship of PersonelCard to Personel
> Personel = Object Entity;
> firstName = attribute of Personel;
> Prefetched objects of PersonelCard's relational tables(like PersonelRel) refreshed correctly
but attiributes (like badgeNo) of PersonelCard table refreshed only first update. 
> For example: if you change the firstName "ex1",then "ex2" then "ex3" then "ex4" console
prints for firstName:
> ex1
> ex2
> ex3
> ex4 This is correct.(PersonelRel.firstName)
> But when I update the badgeNo like "ex1",then "ex2" then "ex3" then "ex4" console prints
for badgeNo:
> ex1
> ex2
> ex2
> ex2 This is not correct.(PersonelCard.badgeNo)
> public static void main(String[]arg){
> DbObject.setContext();
> List list = getLists(); 
> Iterator itr = list.iterator();
> while(itr.hasNext()){
> PersonelCard card = (PersonelCard)itr.next();
> System.err.println("getBadgeNo "+card.getBadgeNo());
> System.err.println("getFirstName "+card.getPersonelRel().getFirstName());
> }
> }
> }
> public static List getLists() {
> SelectQuery query = new SelectQuery(PersonelCard.class);
> query.setRefreshingObjects(true);
> Expression qualifier = ExpressionFactory.matchExp(ASSIGNED_PROPERTY, new 
> Boolean(true));
> query.setQualifier(qualifier);
> qualifier = ExpressionFactory.noMatchExp(BADGE_NO_PROPERTY, null);
> query.andQualifier(qualifier);
> qualifier = ExpressionFactory.noMatchExp(BADGE_NO_PROPERTY, new Integer(0));
> query.andQualifier(qualifier);
> qualifier = ExpressionFactory.noMatchExp(TRANSPONDER_NO_PROPERTY, null);
> query.andQualifier(qualifier);
> qualifier = ExpressionFactory.noMatchExp(PERSONEL_REL_PROPERTY, null);
> query.andQualifier(qualifier);
> qualifier = ExpressionFactory.matchExp("personelRel.deleted", new Boolean
> (false));
> query.andQualifier(qualifier);
> query.setCachePolicy(QueryMetadata.LOCAL_CACHE_REFRESH);
> query.addPrefetch("personelRel").setSemantics(
> PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
> query.addPrefetch("cardValidtyRel").setSemantics(
> PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
> return context.performQuery(query);
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message