Truncated Tables on persistence query console Follow
Hi,
I have created a DataSource. If I set the DataSource (on the right side of the IDE) on the "Open Database Console" click, I can write my statement. Everything is OK.
If I click Persistence button (on the left side of the IDE) and go to "Open Query Console", then I have empty tables.
What am I doing wrong?
Please sign in to leave a comment.
Hello.
Can you attach a screenshot with a picture you see after query execution?
Thank you,
Alexander.
Hello,
i think i found the reason! In persistence.xml i have
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
And if I try to start the query console then the tables are truncated.
I've testet it with value="update" and it looks as the tables are not empty.
Does it work properly?
Thanks
Yes, it looks like the reason. Notice that this behavior is managed by Hibernate classes, not by IDE console.
Thank you.