ObjectDB ObjectDB

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).

edit
delete
#2

This is a good idea, thanks.

ObjectDB Support
edit
delete
#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
edit
delete
#4

My life is complete!

edit
delete

Reply

To post on this website please sign in.