About datetime

manual

JPA Persistable Types

Explains how JPA manages types, including entity classes, embeddable classes, primitive types, wrappers, string, date, enum, collections and maps. The term persistable types refers to data types that can be used in storing data in the database. ObjectDB supports all the JPA persistable types, which are: User defined classes - Entity classes, Mapped superclasses, Embeddable cl ...

 
manual

Database Schema Evolution

Explains how ObjectDB handles automatically schema changes. Modifications to entity classes that do not change their persistent field definitions (their schema) are transparent to ObjectDB. This includes adding, removing and modifying constructors, methods and non persistent fields. However, additions, deleti ...

 
forum_thread

Finding an object by its datetime

SearchBookingByTimeStamp() { Calendar btime = Calendar.getInstance(); btime.set(2012, 10, 11, 7, 30, 00); //This time is already inserted, trying to find it /* My Query */ TypedQuery<Booking> query = em.createQuery( "SELECT b FROM Booking b WHERE b.btime = :btime", Booking.class) .setParameter("btime", btime, TemporalType.TIMESTAMP); } @Entity public class Booking { @Temporal(TemporalType.TIMESTAMP) Calendar btime; }   #1 2012-11-12 06:11 SearchBookingByTimeStamp ( ) {   Calendar btime = Calendar. getInstance &# ...

 
forum_thread

Order in WHERE Clause affects behaviour on DATE/DATETIME columns

Quick example:  public class MyClass { @Column(name = "myText") String myText; @Temporal(TemporalType.TIMESTAMP) @Column(name = "myDate") Date myDate; } Now, when querying the db with: #1 2017-07-26 07:33 Quick example:  public class MyClass {   @ Column ( name ...

 
api-jdo

VersionStrategy.DATE_TIME

(Enum Constant of javax.jdo.annotations.VersionStrategy)

 
forum_thread

Wrong data stored in time only fields

This may be related to the fix for the problem described in this thread: Wrong data stored in date only fields. The object and its date and time fields are the same as in the referenced thread. Except we are using ObjectDB 2.6.4_08, the system time zone is set to EST and both the OS and JVM are using the 2015g time zone data. ... ; // Add records that are a problem DateTime dt = null ; try { dt = new DateTime ( dtf. parse ( "2015.10.30 18:18:14" ) ...

 
forum_thread

Date field Index is corrupted due to time change

Hi, can you shed some light on why we cannot delete data from the attached DB file. A delete attempt with DB explorer results in the following exception: ... ) ;   // Add records DateTime dt = null ; try { dt = new DateTime ( dtf. parse ( "2015.10.31 09:18:14" ) , ...

 
forum_thread

java 8 LocalDateTime is not working in query

My entity class has a field of type java.time.LocalDateTime. I'm able to persist entities and I'm able to query without datetime field in where clause, but with datetime in where clause doesn't return anything and not exception.   ... able to persist entities and I'm able to query without datetime field in where clause, but with datetime in where clause doesn't return anything and no exception. ...

 
issue

NPE at com.objectdb.jpa.JpaQuery.getResultList

This is very similar to issue #51  raised by kaosko .   So perhaps I should have added it there.  Anyway, here it is....   ... cb. desc ( fromMomentPayload. get ( "dateTime" ) ) ) ; Query q = ... cb. desc ( fromMomentPayload. get ( "dateTime" ) ) ) ; Query q = ...

 
forum_thread

Java 8 time API

Hi.   Is Java 8 new DateTime API supported natively or through Converters in the newest versions of objectdb? If not, can we expect this feature in the next releases?   Best regards and congratulations on this awesome database.  ... Hi.   Is Java 8 new DateTime API supported natively or through Converters in the newest versions of ...