If you want related objects to be refreshed you have to use prefetches to explicitly refresh them.
InvalidateObjects doesn't refresh related objects in the object graph, only the objects you explicitly pass to it. On Sun, May 9, 2021 at 1:14 PM yazmin georgina quintal <geolit...@yahoo.com.mx.invalid> wrote: > Hi, We are using 4.0.B2 and found that object relationships are not > refreshed. We have tried: > 1. invalidateObjects(object): simple properties are refreshed from db, but > relationShips remain untouched.2. RelationshipQuery: better, but only > refresh entities already in the objectContext, does not requery db for new > o deleted related entities. > This issue araised now that we begin using more than one running session > of out app, where other stations can add or delete related entities to a > common parent. > The workaround for now is not usuing object relationships but to requery > related entities with manual ObjectSelect... this is not OO from the domain > model's view point. > > Summary. > objectContext.invalidateObjects(parent) does not invalidate parent's > relationships ... so parent.getRelatedEntities() does not have the current > state. > > Does somebody has more info on this ?... does a more recent version > invalidate full object graph ?. > Thanks. > > Saludos.Atte. Ing. Juan Manuel Díaz LaraCel. 9932 293338 > > Atte. Yazmín Georgina Quintal Moo > Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab. > Tel 993 1311688 > Cel. 9932 493007 >