ObjectDB ObjectDB

Internal Website Search

21-30 of 200 resultsRefresh


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? dmoshal David Moshal When a Date instance is stored in an ObjectDB database it is converted automatically

Group by date / time

. Each entity has it's own field that holds java.lang.Date. There is no function like YEAR(), MONTH() or ... stats WHERE YEAR(record_date) = 2009 GROUP BY YEAR(record_date), MONTH(record_date) or maybe something like this: SELECT COUNT(id) FROM stats WHERE YEAR(record_date) = 2009 GROUP BY DATE

How to store and compare Date up to sec.

How to store and compare date up to sec? By default it stores the dates like "23 May, 2020 10:25:23:112 AM" means date and timestamp including milisec but I want to store till sec("23 May, 2020 10:25:23 AM") like MySql and other db. They stores the date up to sec. Manoj Manoj Kumar Maharana

Auto Date for Creation and Update

Hi, is there a way with objectdb to use annotations so that - automatically - the creation Date gets updated once only and the change Date on each change? It seems for hibernate there Are annotations for it for Dates and also prepersist and preupdate. How about with objectdb? Kind regards, Thomas

com.objectdb.o.InternalException: java.lang.NoClassDefFoundError: java/sql/Date

.NoClassDefFoundError: java/sql/Date java.lang.NoClassDefFoundError: java/sql/Date at objectdb/com ... .ClassNotFoundException: java.sql.Date at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass ... because java.sql.Date comes with the JDK. I'm stumped. esharris Earl S Harris See a workaround on https

Query results are not up to date for entities, not primitives

TypedQuerys. I just realized that the data retrieving up to date if I do not use the generic on parameters ... queries should return up to date results, if: You are using a new EntityManager (i.e. with no old ... limitation in respect of getting up to date data from later queries. Try to replace UPDATE queries

Using date in where clause

-2013" Here I have created Persons object as java.sql.Date attribute. But in doing so I am getting ... with date in where clause. n126961 Sandip The query is invalid because you compare a date (the creationDate field) with a string literal ("07-25-2013"). Replace the string with a date literal or a parameter. support Support

Order in WHERE Clause affects behaviour on DATE/DATETIME columns

; @Temporal(TemporalType.TIMESTAMP) @Column(name = "myDate") Date myDate; } Now ... would get an IllegalArgumentException: Parameter value [%myQuery%] did not match expected type [java.util.Date (n/a)] because I ... obviously makes a difference. The date column seems to be converted to a String

Bug when using SIZE in combination with date lower parameter

there seems to be a bug if I use the lower date select: SELECT j.jobId, SIZE(j.tags) FROM ParserJob j WHERE j.dateCreated < :date This returns a SIZE(j.tags) of 0 Tags, but the only existing ParserJob has 1 Tag. If I run the query: SELECT j.jobId, SIZE(j.tags) FROM ParserJob j WHERE j.dateCreated >= :date I

com.objectdb.o.InternalException: java.lang.NoClassDefFoundError: java/sql/Date

: java.lang.NoClassDefFoundError: java/sql/Date java.lang.NoClassDefFoundError: java/sql/Date ... :19) Caused by: java.lang.ClassNotFoundException: java.sql.Date at java.base/jdk.internal ... . Any idea why java.sql.Date is not found in the classpath? Which Java version are you using

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support