devng / twig-persist

Automatically exported from code.google.com/p/twig-persist
0 stars 0 forks source link

GaeKey not initialized on store() or update() #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create entity class:

class A {
    @Id
    private long id;
    @GaeKey
    private String key;
}

2a. Call ObjectDatastore.store() or ObjectDatastore().associate() followed by 
ObjectDatastore.update().

2b. Call ObjectDatastore.find() to return the A instance from the datastore.

What is the expected output? What do you see instead?

In both of #2a cases, above, A.id is initialized to the value of the id in the 
datastore. In neither case is A.key initialized. It remains null.

In #2b, above, both A.id and A.key are initialized.

My expectation is for both A.id and A.key to be initialized in all of the above 
cases.

What version of the product are you using? On what operating system?

Source code build from sources downloaded on Mar 27, 2011. Ubuntu 10.10.

Original issue reported on code.google.com by rickh...@gmail.com on 29 Apr 2011 at 11:01

GoogleCodeExporter commented 8 years ago
method maybeSetId needs to be updated to also set the @GaeKey field

Original comment by jdpatterson on 30 Apr 2011 at 3:25

GoogleCodeExporter commented 8 years ago
Fixed locally.  Just need to test and roll into main branch

Original comment by jdpatterson on 3 May 2011 at 9:38

GoogleCodeExporter commented 8 years ago
This should be fixed in v2.0 hg repo now

Original comment by jdpatterson on 5 May 2011 at 8:17