Truncated Tables on persistence query console

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?

3 comments
Comment actions Permalink

Hello.

Can you attach a screenshot with a picture you see after query execution?

Thank you,
Alexander.

0
Comment actions Permalink

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
0
Comment actions Permalink

Yes, it looks like the reason. Notice that this behavior is managed by Hibernate classes, not by IDE console.

Thank you.

0

Please sign in to leave a comment.