About date
Date and Time in JPQL and Criteria Queries
Shows how date and time can be used in JPQL queries. Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12-31'} , {t ... . as parameters - when date and time values are assigned as arguments. as path ...
JPA Persistable Types
Explains how JPA manages types, including entity classes, embeddable classes, primitive types, wrappers, string, date, enum, collections and maps.... Simple Java data types: Primitive types, Wrappers, String, Date and Math types. Multi value types - Collections, Maps and ... Classes Simple Java Data Types Date and Time (Temporal) Types Multi Value Types ...
log entry date/time
It would be very useful if each entry in the log file has a date/time stamp. Thanks, Carl ... would be very useful if each entry in the log file has a date/time stamp. Thanks, Carl ... Version 2.2.2 adds date/time stamps to the log. Thank you for your suggestion. ...
Literals in JPQL and Criteria Queries
Describes literals in JPQL, including null, false, true, numbers, strings, dates enums and types.... Literals String Literals Date and Time Literals Enum Literals Entity Type ... and 'ABC' are not equivalent. Date and Time Literals JPQL follows the syntax of SQL and JDBC for date ...
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: ... 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 ... id ) FROM stats WHERE YEAR ( record_date ) = 2009 GROUP BY YEAR ( record_date ) ...
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. ... 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 ...
Database Schema Evolution
Explains how ObjectDB handles automatically schema changes.... is automatically converted into an instance of the up to date entity class. This is done automatically in memory each time the entity ... to the new type (for instance a change from int to Date ) the fields are not considered as matching and the new field is ...
Problem with 'where' and date()
Hi, Today I was playing with some date-range queries in explorer and found a small problem. When you try to use queries like this: SELECT o from TestObject o where o.date > :someDate where o.date is java.util.Date, 'where' doesn't work as it should. Results are not filtered by date. There is no such problem in code because we can set Date() object as parameter. However this is hard in explorer. You can find UTC attached to this post. ... Hi, Today I was playing with some date-range queries in explorer and found a small problem. When you try to use ... SELECT o FROM TestObject o WHERE o . date > :someDate where o.date is java.util.Date, ...
Dates
Question on dates. SQL doesn't seem to store timezone with dates (oddly). So, any best practises with ODB? 1. use java.util.Date 2. Milliseconds since January 1, 1970, 00:00:00 GMT 3. other?... any best practises with ODB? 1. use java.util.Date 2. Milliseconds since January 1, 1970, 00:00:00 GMT 3. ... 06:10 When a Date instance is stored in an ObjectDB database it is converted automatically ...