this drives me crazy:
I query for entities. If none found I create an entity, persist it and
shutdown everything. Looking into the database (by unit test or squirrel
sql) does not show any entry in the table.
Creating a dummy 2nd entity and persisting both in one transaction, they
both show up.
When removing the dummy entity within the same or next transaction (using
the same entity manager instance) the table is empty again.
Creating a dummy 3rd entity and persisting all three in one transaction,
all three show up.
Removing the dummy 2nd entity in the same transaction having added all
three before, the first and the 3rd entity remain in the table.
Modifying the initial query not exclude the dummy entity, the table again
I disable the querying for entities completely and everything behaves as
expected (without any dummies).
Using a different entity manager instance for the query does not help
OK, I just found that this deals with connecting a second time to the same
database from within the test. The tables are dropped and created again
... though I do specify the ";create=false" in the jdbc connect url ...