156 words

Insert a new entity class in a class hierarchy does not work

#1
2017-03-13 16:11

Hello,

we have an entity class hierarchy and we want to insert a new entity in this hierarchy and our database must be automatically updated by schema evolution.

Unfortunately it does not work, because the class hierarchy had already always existed and the "new" entity class needed still only the @Entity annotation, all remaining fields got null as a value.

Only if the new entity would be also inserted new in the class hierarchy then it works well.

See our example in the attachments.

Execute first the test1. Field "name" of the entity NamedEntity is set to "name 1"
Afterwards annotate the AbstractEntity with @Entity.
And last execute test2.
You can see the field "name" of the entity NamedEntity is set to null.
Actually I would expect that remaining fields hold its values.

 

ObjectDB: 2.7.0

JDK: 1.8.0

 

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #171
#2
2017-03-15 16:05

Thank you for this report. Please try build 2.7.0_01 that should fix this bug.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support
support's picture
Joined on 2010-05-03
User Post #2,714
#3
2017-03-17 15:14

Thank you for the fix. It works.

btc_es
btc_es's picture
Joined on 2014-10-20
User Post #174

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Attachments:
Maximum file size: 32 MB
Cancel