devng / twig-persist

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

@GaeKey doesn't contain hash key after storing objet #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use the current trunk of branch 2.0.

After storing object in database, twig sets the key in the @GaeKey field. But, 
when the field type is String type, twig calls toString method instead of call 
KeyFactory.keyToString(key). 
So, the field key String does not a hash but a representation of key :
com_google_code_twig_annotation_AnnotationObjectDatastoreTest$GaeKeyStringModel(
1)
instead of 
agR0ZXN0clULEk9jb21fZ29vZ2xlX2NvZGVfdHdpZ19hbm5vdGF0aW9uX0Fubm90YXRpb25PYmplY3RE
YXRhc3RvcmVUZXN0JEdhZUtleVN0cmluZ01vZGVsGAEM

I created a patch for this issue. It completes the current unit test and 
correct the bug. 

Original issue reported on code.google.com by lafe...@gmail.com on 24 May 2011 at 1:20

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! I've updated locally and will push with a couple of other changes.

Original comment by jdpatterson on 24 May 2011 at 4:29