About begin

forum_thread

Speed of queries that return many objects

Hi, I have a DB of 146MB - with 1_000_000 elements. Loading the contents (objectDB query in java) takes about 10sec. I am using a recent MacBook (SSD blabla - disk I/O speed is about 400MB/sec - according to blackMagicTest app for mac) - so I was expecting the query to take less than one sec (146/400 = 0.35sec.. + some overhead). I was wondering if this kind of speed is "normal", or if this is something I should investigate. Thanks EKK ... em. getTransaction ( ) . begin ( ) ; for ( int i = 0 ...

 
forum_thread

mappedBy problem

If I put the mappedBy element to the @OneToMany, the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String name; @OneToMany(targetEntity=Address.class,mappedBy="employee") public List<Address> addresses; }   @Entity... e.g. em. getTransaction ( ) . begin ( ) ;   Employee employee = new ...

 
forum_thread

Replicated cluster recovery

If I create a replicated database cluster as per http://www.objectdb.com/java/jpa/tool/replication what is the behaviour of the master database after a failure? For example, say I have MasterDB and SlaveDB in the cluster. If MasterDB goes offline the application will automatically switch to SlaveDB. When MasterDB comes back online it will have missed any activity that occured during the downtime. #1 2011-04-08 16:07 If I create a replicated database cluster as per http://www.objectdb.com/java/jpa/tool/replication what is the be ...

 
forum_thread

java.sql.Timestamp with milliseconds

Using JPA with other providers java.util.Date will not provide support to store milliseconds, this can usually be overcome using (see here http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Timestamp.html) @Id @Column(name = "STMP") @Temporal(TemporalType.TIMESTAMP) private Timestamp timestamp; However with ObjectDB the milliseconds are not being stored, as shown this is an ID field and I am encountering duplicate ID errors trying to create multiple entries in the same second. ...   em. getTransaction ( ) . begin ( ) ; for ( int i = 0 ...

 
api-jdo

javax.jdo.spi.StateInterrogation

This interface is implemented by a non-binary-compatible JDO implementation to provide state interrogation for non-enhanced persistent classes.(Interface of JDO)

 
forum_thread

@Transient

Hello, I have a persistent class which looks something like this: @Entity public class Test { private String string; private Date date; @Transient private boolean test; // getters/setters } When I persist the class the transient 'boolean test' is stored in the database, maybe I am doing it wrong but I expect...   odb. getTransaction ( ) . begin ( ) ; odb. persist ( agency ) ; ...

 
forum_thread

Run out of memory

Hi, I've been looking into ObjectDB for our use, where everything has been great apart from I'm stuck on the following problem.   I am trying to load a large file (> 1GB), process certain information and store it back in the database to access / modify later. I require to be able to rollback changes as well, where there can be massive amount of changes.   ... this . em . getTransaction ( ) . begin ( ) ; }   protected void ...

 
api-jdo

javax.jdo.JDOHelper

This class can be used by a JDO-aware application to call the JDO behavior of PersistenceCapable instances without declaring them to be PersistenceCapable.(Class of JDO)

 
forum_thread

Memory consumption of empty Strings

After doing some memory related research in my program, I found a possible place for an enhancement of objectdb: My program has several entities which contain many String. Often some of these String are empty (""). To avoid unnecessary memory consumption, the String within the entities are initialized like: String firstName = ""; ... entityManager. getTransaction ( ) . begin ( ) ; entityManager. persist ( entity ...

 
issue

JDO PersistenceManager.getSequence() returns null sometimes

When using JDO without annotations, database sequences are normally defined in the ORM file. Following discussion on the forum I was told that ObjectDB supports sequences if specified in the JDO file. Unfortunately, it doesn't seem to be supported consistently. It appears to work only in the situation that a new odb file has just been created AND something has been persisted to it. If nothing has yet been persisted, or if the odb file is not newly created, getSequence() returns null. Code to reproduce: ... pm. currentTransaction ( ) . begin ( ) ; Thing thing = new Thing ( ...