tzaeschke / zoodb

ZooDB Object Database
Apache License 2.0
57 stars 9 forks source link

Repeating schema auto-creation after failed commit causes NPE #54

Closed tzaeschke closed 5 years ago

tzaeschke commented 9 years ago

See Test_038_SchemaAutoCreate.testSchemaAutoCreationBug_Issue_54(). If an auto-created schema cannot be commited because of a commit() failure (for example unique index clash) then a second attempt at auto-creating the schema causes an NPE during the next commit while serializing the instance that causes the auto-creation.

The reasons is that a call to refreshSchema() during the first failed commit does not properly refresh the schema. It fails to re-associate fields from super-classes and does not refresh the associated Java-Fields.

tzaeschke commented 5 years ago

Fixed for 0.5.2