Hi, can't seem to get drop to work in c/s mode:
version: objectdb-2.3.5_04
config: <extensions drop="tmp" />
url: 'objectdb://localhost/testStorage1.tmp;drop;user=admin;password=admin'
suggestions?
David
Hi, can't seem to get drop to work in c/s mode:
version: objectdb-2.3.5_04
config: <extensions drop="tmp" />
url: 'objectdb://localhost/testStorage1.tmp;drop;user=admin;password=admin'
suggestions?
David
Just checked using the following simple test and it works (always prints 1):
import javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; public class T627 { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory( "objectdb://localhost/testStorage1.tmp;drop;user=admin;password=admin"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(new MyEntity()); em.getTransaction().commit(); System.out.println( em.createQuery("SELECT COUNT(e) FROM MyEntity e").getSingleResult()); em.close(); emf.close(); } @Entity public static class MyEntity { } }
Maybe your server configuration doesn't include tmp as a valid extension for drop?
I am using this:
<extensions drop="tmp" />
I tried your example at it works as long as the Explorer is not connected to the database.
ie: If explorer is connected to a c/s database then it is not dropped!
I confirmed this with my code.
In my view, this is a bug in the drop feature, as it's important to be able to have the explorer open during testing.
David
Drop is possible only for a database that is currently not open and in use.
The Explorer is like any other database user so a database cannot be deleted while it is open and in use by the Explorer.
You may fill a feature request if you think that this behavior should be changed.