Open GoogleCodeExporter opened 8 years ago
Please present a simple testcase, what log entries you get when you attach
without that setting and what you get with it. In my mind, with GAE you will
always have a GET to find the Entity that it relates to, but then without the
testcase that will never be demonstrated. That setting is designed for RDBMS
obviously.
Original comment by googleco...@yahoo.co.uk
on 23 Aug 2012 at 8:32
I'm sorry I'm very busy right now and this is not a priority, but I will
definitely post the testcase later. However I don't see why this shouldn't work
for GAE but maybe I don't understand the purpose of this setting.
According to the documentation, when the object is about to be attached back,
DataNucleus first checks if the entity really exists in current datastore. I
thought this was meant just to avoid mess and inconsistency in the application.
In my app, I can guarantee that the detached entity has its equivalent in the
datastore and therefore this check is redundant for me. And I would guess that
this "check" is nothing more then querying datastore by the key of the detached
entity. And that's imho the same for GAE and RDBMS. Maybe it's designed for
RDBMS but it would be really useful for GAE datastore as well.
(Why I need this: I cache some entities in my app and I have to store them in
detached state. Otherwise the whole entity group, that means including all
child objects, would be fetched and cached as well. When I get the entity from
the cache and want to access the child objects, I have to attach the entity
first. However since the entity already contains everything required for
running an ancestor query, I don't think it's necessary to call the extra GET.)
Original comment by tobiaspo...@gmail.com
on 23 Aug 2012 at 9:17
Original issue reported on code.google.com by
tobiaspo...@gmail.com
on 21 Aug 2012 at 10:20