RefreshQuery

2008-08-18 Thread John Armstrong
Hello all, Can someone point me to a source of info for RefreshQuery? The guide is pretty thin on it and I *think* it will solve my problem but can't get it to actually do what I think it should do :) Entirely user error on my side. Scenario: I have an object that is updated via s

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrey Razumovsky
g query work with inserting >>> or >>> deleting rows in database. For instance: >>> >>> >>> Artist a = ... >>> >>> assert a.getPaintingsArray().size() == 0; >>> >>> >>> //here is direct insert into database a painting

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrus Adamchik
ovsky wrote: Hi! I can't figure out how to make the refreshing query work with inserting or deleting rows in database. For instance: Artist a = ... assert a.getPaintingsArray().size() == 0; //here is direct insert into database a painting of artist a (artistid=a.id ) RefreshQuery

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrus Adamchik
tance: Artist a = ... assert a.getPaintingsArray().size() == 0; //here is direct insert into database a painting of artist a (artistid=a.id ) RefreshQuery refresher = new RefreshQuery(); context.performGenericQuery(refresher); assert a.getPaintingsArray().size() == 1; //that's false

Re: RefreshQuery not supports insert/delete?

2008-06-25 Thread Andrey Razumovsky
- this is roughly the same as restarting the client. I haven't tried a), but this is no better than my workaround because I need to manually specify objects for refresh. What I wish is all objects *with their rels* be refreshed when I perform full RefreshQuery() [no parameters here]. Still, there&#

Re: RefreshQuery not supports insert/delete?

2008-06-24 Thread Marcin Skladaniec
Hi This was something I reported before , but I cannot find the message anymore. Are you using caching ? what type ? are you using cache keys ? Try: a) new RefreshQuery(artist) b) do a query in new context c) do a query in new context with no caching. In our setup we have overriden the

Re: RefreshQuery not supports insert/delete?

2008-06-24 Thread Andrey Razumovsky
Hi Andrus! I can now see it too, just somewhy it was delivering for more than an hour. Dev list accepts messages immediately. I managed to do some workaround. After the refresh, i do: Collection objects = context.getGraphManager().registeredNodes(); for (Object o : objects) { if (o instanceof

RefreshQuery not supports insert/delete?

2008-06-24 Thread Andrey Razumovsky
Hi! I can't figure out how to make the refreshing query work with inserting or deleting rows in database. For instance: Artist a = ... assert a.getPaintingsArray().size() == 0; //here is direct insert into database a painting of artist a (artistid=a.id ) RefreshQuery refresher

cache and RefreshQuery

2008-03-03 Thread Marcin Skladaniec
Hi Using ROP, paging and LOCAL_CACHE in cayenne built from trunk about month ago I'm trying to force cache refresh using performGenericQuery(new RefreshQuery(object)); but it does not seem to work. Is it a right way to refresh the cache ? Could someone advice on what to debug to f