About null

forum_thread

Changes in detach behaviour?

Hello! Today i upgraded to 2.3.5_04. My program stopped working. After some debugging i found out that all fields of retrieved objects are on their default value till i first call a getter or detach them explicitly. Up to 2.3.4 they where initialized immediately. The problem in my case is that i have a Spring DAO. It does the following: I call for example getUserByName("blub). ... classes. If you run the project you'll see the output "null". If you use version 2.3.4 then the output is "username". I think lazy ...

 
forum_thread

Storing objects problem

I want to save this object to database: @Entity public class Device { private String name; private String type; private String ipAddress; private Device parent; @Id private String ID; private String ID_HZMO; @ElementCollection private List<Device> children; }    ... ( ) ; this . parent = null ; }   public List<DeviceT> getChildren ...

 
forum_thread

How to add minutes to a Date with JPA2

Hi,  I have to sum to a date of minutes, and check the date obtained is greater than the current date. My idea is as follows: Calendar currentTime = Calendar.getInstance(); Date currenteDate = currentTime.getTime(); Expression<Date> dateCapture = root.get(Counter_.dateCapture); Expression<Integer> samplingPeriod = root.get(Counter_.samplingPeriod); Expression<Integer> delayMinutes  = cb.prod(samplingPeriod,3); //minutes to be added ... ) RETURN DATE IS data_delay date: = NULL ; BEGIN SELECT DATE + ( ( PERIOD * DELAY_PERIOD ...

 
forum_thread

can't get HashMap out of the database

I'm trying to persist an Entity containing a HashMap. It stores the data in the database OK, but the map is always empty when I get the entity out of the database again. I've reproduced this problem in a simple variation of the Guestbook tutorial: Guest class: ===================== ... be a bit closer to the actual code and I am now getting a null pointer exception trying to access the map in the nested object: ...

 
issue

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.ENH.g(ENH.java:401) at ...

 
manual

Deleting JPA Entity Objects

Explains how to use JPA to delete (remove) entity objects from the database.... example, such as when setting the address field to null or to another Address object. If orphanRemoval=true ...

 
forum_thread

com.objectdb.o.InternalException: Unexpected internal exception

Hi, I am using objectdb.jar version 2.6.8 (installed via Maven). I am trying to authenticate a user. Initially, the database is empty. I have the following query: @javax.persistence.NamedQuery(   name = "getPersonByName",   query = "SELECT _person FROM metamodel.user.Person as _person WHERE _person.userName = :userName" ) I execute the query as follows: ... due to an unexpected SharedCacheMode null value in the  PersistenceUnitInfo that was used to initialize the ...

 
issue

Can't open replicated database

I have a database running in server mode on port 6136 on server1 and server2. Each server has a replicated copy of the other servers database. I try to open the replicated on one database for a query (just read, no update) but it fails with the error below. The code I'm using is (user & password has been deliberately removed): ... sure if its related but I'm also getting the following null pointer exception [2011-07-23 17:38:51 #14 ...

 
forum_thread

500Mb ObjectDb database opening issue

Hi, I have observed that 500 Mb objectDb database opening time is very slow (~3 seconds) for following code m_EntityMgrFactory = Persistence.createEntityManagerFactory( "objectdb:" + aFilename ); m_EntityManager = m_EntityMgrFactory.createEntityManager(); Does exist any way to speed-up open time for big databases? Definitely, it's too long for 500 Mb database! ... ( ) ; m_EntityManager = null ;   m_EntityMgrFactory. close ( ) ; m_EntityMgrFactory = null ;   Files. deleteIfExists ( Paths. get ...

 
forum_thread

Schema-Update: Rename superclass and remove one subclass

Hello, we renamed a superclass and removed one of the subclass. If we then try to open the Database (with ObjectDB-Explorer) we get a "Failed to generate dynamic type ..."   Small Example: Generate Database ... java.lang.NullPointerException: null java.lang.NullPointerException at com.objectdb.o.ENH.g(ENH.java:401) at ...