-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PolyModels can't be retrieved from bdbdatstorage #13
Comments
The key and _class_map seem to have reversed keys . 304 if (_CLASS_KEY_PROPERTY in entity and (Pdb) key (u'CourseCampus', u'Reference') (Pdb) _class_map {('Reference', 'CourseCampus'): <class 'psc.models.coursecampus.CourseCampus'>, ('Reference', 'UnitListUnitOfStudy'): <class 'psc.models.unitlistunitofstudy.UnitListUnitOfStudy'>, ('Reference',): <class 'psc.models.reference.Reference'>, ('Reference', 'Classification'): <class 'psc.models.classification.Classification'>} |
Ok further investigation shows that the class attribute of the raw entity has the values order reversed when saved in bdbdatastore vs standard sdk. But on the entities creation before being saved the class attributes values are in the correct order.
Later on retrieval of that record from bdbdatastore has the values reversed.
-> try: (Pdb) p key (u'CourseCampus', u'Reference') (Pdb) p entity {u'src': datastore_types.Key.from_path(u'Course', u"(97868, u'0386')", _app_id_namespace=u'psc-dev1'), u'src_id': None, u'target': datastore_types.Key.from_path(u'Campus', u"(u'1304587',)", _app_id_namespace=u'psc-dev1'), u'created': datetime.datetime(2009, 9, 3, 0, 7, 46, 720900), u'reference_type': None, u'target_id': None, u'modified': datetime.datetime(2009, 9, 3, 0, 8, 38, 390370), u'class': [u'CourseCampus', u'Reference']} |
I have run into a problem now though with PolyModels
I can create them fine, however if I fetch the entity I get the
following error.
Exactly the same code works fine with standard SDK datastore
The text was updated successfully, but these errors were encountered: