Using a file extension other than .odb

#1

I love that ObjectDB's implementation of Persistence.createEntityManagerFactory(...) treats a parameter ending in .odb as a file name rather than a persistence unit name.  It makes opening a DB in my app as easy as selecting it from a file chooser.

However, I wish that I could use a file extension other than odb.  Since this functionality is already non-standard, why not allow it?  Perhaps any string beginning with "file://" could be treated this way.

Edit: Or maybe better, provide the non-standard method Persistence.createEntityManagerFactory(File, Map).

#2

This is a good idea, thanks.

ObjectDB Support
#3

Starting version 2.2.9 you can use other extensions, as long as the url starts with objectdb:

For example:

    EntityManagerFactory emf =
        Persistence.createEntityManagerFactory("objectdb:db.my");
ObjectDB Support
#4

My life is complete!

Reply