About MONTH

manual

Date and Time in JPQL and Criteria Queries

Shows how date and time can be used in JPQL queries.... supports 6 functions for extracting the YEAR , MONTH , DAY , HOUR , MINUTE and SECOND . For example: ... is evaluated to 2011 . MONTH({d '2011-12-31'}) is evaluated to 12 . ... See JavaDoc Reference Page... <Integer> month = cb. function function(name, type, args) ...

 
forum_thread

Group by date / time

Hi, I'm trying to create reporting query that will return entities grouped by year / mont / day. Each entity has it's own field that holds java.lang.Date. There is no function like YEAR(), MONTH() or DAY() in ODB. So, how to build queries similar to something like this: SELECT COUNT(id) FROM stats WHERE YEAR(record_date) = 2009 GROUP BY YEAR(record_date), MONTH(record_date) or maybe something like this: ... holds java.lang.Date. There is no function like YEAR(), MONTH() or DAY() in ODB. So, how to build queries similar to something like ... GROUP BY YEAR ( record_date ) , MONTH ( record_date ) or maybe something like this: ...

 
forum_thread

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time (from documentation): YEAR({d '2011-12-31'}) is evaluated to 2011. MONTH({d '2011-12-31'}) is evaluated to 12. DAY({d '2011-12-31'}) is evaluated to 31. HOUR({t '23:59:00'}) is evaluated to 23. MINUTE({t '23:59:00'}) is evaluated to 59. SECOND({t '23:59:00'}) is evaluated to 0. ... YEAR({d '2011-12-31'}) is evaluated to 2011. MONTH({d '2011-12-31'}) is evaluated to 12. DAY({d ... few queries I was concatenating 'date' from year()-month()-day() calls, but this method is quite error prone and final queries are ...

 
forum_thread

TemporalType injection with Calendar using JPA

I have ObjectDB  JPA  comsummed by a RESTful web service deployed on Tomcat. I am using an embedded object as a primary key, which has time fields which I have annotated with TemporalType.TIMESTAMP When I use a java.util.Date as a field on this object there is no problem. However, if I use a java.util.Calendar it encounters an exception.   Calendar is what I need.  Is there something obvious here that I am failing to see?   #1 2011-05-30 17:15 I have ObjectDB  JPA  comsummed by a RESTful web service deployed on Tomcat. I am using an embe ...

 
forum_thread

java.lang.ClassCastException: CriteriaQueryImpl cannot be cast to java.util.List

Can someone please tell me what I'm doing wrong here? public List<Person> read(String name, ServletContext servletContext) {         EntityManagerFactory emf = (EntityManagerFactory) servletContext.getAttribute("emf");         EntityManager em = emf.createEntityManager();         List<Person> allPersons;         try { #1 2014-04-18 13:03 Please follow the posting instructions and use a separate thread for each subject. Your new question ...

 
release

2.2.9

... Added support of date methods ( YEAR , MONTH , DAY , HOUR , MINUTE , SECOND ). Added ...

 
forum_thread

ObjectDB Manual

Hello,I would like to be able to read or refer to the ObjectDb manual (v2) on my Kindle. Unfortunately, I didn't find any option to download the manual, either as a .pdf (most convenient)or as a zipped set of .html files (a single file would be better for an easier conversion to .pdf) Is there such an option I'm unaware of on your website or could you make the manual available for offline reading?Very best regards,Paul... a PDF version of the manual will be available later this month. ObjectDB Support ObjectDB - Fast Object ...

 
issue

JPA Metamodel (JPA 2.0)

The JPA Metamodel API enables examining the classes, fields and properties of the persistent object model, similarly to the Java reflection API. The JPA Metamodel API has a major role in defining queries using the JPA Criteria API.... version 2.2, which is expected to be released later this month. ObjectDB Support ObjectDB - Fast Object ...

 
forum_thread

LEFT JOIN FETCH over empty embedded collection returns no results

First of all, thank you for promptly implementing JOIN FETCH over nested paths in response to my inquiry a few months ago. However, I have run into one problem: if an embedded collection is empty, but I attempt to LEFT JOIN FETCH all the members of a collection within a (non-existent) member of the first collection, the result of the overall query is an empty set. To use the example from my original post: @Embeddable class A { String val; };   #1 2013-05-23 11:06 First of all, thank you for promptly implementing JOIN FETCH over nested paths in response to my inquiry a few mo ...

 
issue

Service terminated silently (crashed?)...is there any way to cause a crash dump?

After running without issue, uninterrupted for seven months, our instance stopped silently.  The contents of the log are as follows: Object DB log: ObjectDB Server started on port 6138. ObjectDB Server stopped. ObjectDB Server started on port 6138. ObjectDB Server stopped. ObjectDB Server started on port 6138. ObjectDB Server started on port 6138.  <--This is where I restarted the service.   Note there is no "Server stopped" before the final "Server started". Bug Version: 2.6.1 Priority: Normal Status: Active Replies: 1 Type:  Bug ...