About store

forum_thread

Wrong @Id type

Hi,  I have noticed some values of id column suddenly switched to int, although it is declared as long in our java class. Do you have idea why this happened? Screenshot attached.   ... types you will have to 'touch' the objects and store them again, or use an ObjectDB version before the fix, with an UPDATE ...

 
forum_thread

Cast exception?

Somehow I am unable to persist an entity class I wrote with manual @Id. I have a small Player class and I wish to store it with user ID as the primary key. So I declared the (only) primary key field as: @Id public int uid; This is how I'm persisting the instance: ... ) ; Where the query is a NamedQuery store in Player class file: @ NamedQuery ( name = ...

 
forum_thread

Broken @ManyToOne reference

Hi, I have objects of type A belonging to objects of type B, defined as follows: @MappedSuperclass public abstract class A {   @Id   @ManyToOne(fetch = FetchType.EAGER, cascade=CascadeType.ALL, optional=false)   private B b;   @Id   @Column(length = 36)   private String stringId; } @MappedSuperclass public abstract class B {   @Id   private String name; } ... String name ; } Both objects store with no error, but after they are retrived, the 'b' variable in ...

 
forum_thread

Transaction isolation support?

I am looking at using ObjectDB for our new project, and its looking good so far. But I have been unable to find any documentation about how transaction isolation is handled. For example: What happens If I am reading data in transaction A, and then transaction B commits while A is reading. (Especially if using LAZY fetch sub object). Do I always just get the list of objects as it looks when the fetch start? Martin   ... In that case, an exception will be thrown on attempt to store a different update of that specific object using the first ...

 
forum_thread

Entity factory - best practices

Suppose I run a website that handles services such as user registration, user login checks, etc. I have all the credentials stored in an ObjectDB. Currently, each time user sends a request, I initiate a db connection by creating entity manager factory from db on disk, get the entity manager, modify stuff, close the connections. I wonder if it is better to have an overall db manager created on server init, then provide the shared instance over all requests, instead of creating a new one every time. #1 2015-06-13 04:58 Suppose I run a website that handles services such as user registration, user login checks, etc. I have all the c ...

 
forum_thread

Package name for persisted entities

Hi, I have a question about package name and searching for entities. As for now we were using two different databases for two different parts of our system. But we want to make a 'common' model for both systems. After merging entities from two different projects, we get single jar with all entities. Unfortunately some of the names are the same for entities: - homplex.model.dbobject.Inspiration - pl.hplxtool.model.Inspiration #1 2011-10-31 11:59 Hi, I have a question about package name and searching for entities. As for now we were using two differe ...

 
forum_thread

Persisting collection where members are subclasses

OK, I have a number of classes which are all subclasses of Entry (e.g., Folder, Link, Book). In the Folder class, there is a @OneToMany Map<String, Entry> children If I store something in that map which is an Entry, then I can persist just fine. But if I try to put any of the subclasses into the map, then I get  ... @OneToMany Map<String, Entry> children If I store something in that map which is an Entry, then I can persist just fine. ...

 
api-jdo

javax.jdo.JDOFatalDataStoreException

This class represents data store exceptions that cannot be retried.(Exception of JDO)

 
api-jdo

getPersistenceManagerFactory(stream, loader)

Returns a PersistenceManagerFactory configured based on the Properties stored in the input stream at stream.(Static Method of javax.jdo.JDOHelper)

 
api-jdo

storeLongField(fieldNumber, value)

Store one field into the field manager.(Method of javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer)