ObjectDB Database Search

51-100 of 200 results

java.sql.Date equals comparison not working with CriteriaAPI

Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql. Date ... = ...; Root root = ...; java.sql. Date myDate = ...; Predicate predicate = builder.equal(root ... : We can currently not update the ODB version as this is a production system. Note also that doing

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time ... have to group by date (). For few queries I was concatenating ' date ' from year()-month()-day() calls ... to add one more method to above list - date () - that will return only date from java.util. Date

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

GWT RPC is throwing serialization exception when I have object db date value

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'objectdb.java.util. Date ... ;   kpanda ganesh gothai The objectdb.java.util. Date  class is a subclass of java.util. Date ... this is not sufficient for GWT because Date is a special data type. You may have a similar

Wrong data stored in date only fileds

Hi, we have an object with the following fields:   private Date startDateTime; // Time stamp: start of recording in local time zone private Date startDate; // Date : date part of startDateTime private Date startTime; // Time: time part of startDateTime @Basic(optional = false) @Temporal

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

Entity with java.util.Date column gives ClassCastException in BIRT

a simple JPQL query to select the fields. Entity looks like this: package entity; import java.util. Date ... ; @Temporal(value = TemporalType. DATE )     private Date birthdate;     /**   ... ;    */     public Date getBirthdate() {      

Group by date / time

. Each entity has it's own field that holds java.lang. Date . There is no function like YEAR(), MONTH ... 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 _FORMAT(record_ 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

Auto Date for Creation and Update

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 ... these time/ date fields in a JPA lifecycle event methods . support Support Hi, Using the proposed solution I

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

.NoClassDefFoundError: java/sql/ Date java.lang.NoClassDefFoundError: java/sql/ Date at objectdb/com ... .JavaObjectDBApp.main(JavaObjectDBApp.java:14) Caused by: java.lang.ClassNotFoundException: java.sql. Date ... is ... module ObjectDBTest { requires objectdb; } This is perplexing because java.sql. Date comes with the JDK

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 ... ! flavioreboucassantos Flávio Rebouças Santos After such an update queries should return up to date ... limitation in respect of getting up to date data from later queries. Try to replace UPDATE queries

Order in WHERE Clause affects behaviour on DATE/DATETIME columns

(TemporalType.TIMESTAMP) @Column(name = "myDate") Date myDate; } Now, when querying the db with: Query q ... value [%myQuery%] did not match expected type [java.util. Date (n/a)] because I haven't declared ... a difference. The date column seems to be converted to a String so it can be compared with the query

Using date in where clause

-2013" Here I have created Persons object as java.sql. Date attribute.   But in doing so I ... a query 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

Entity Update - Is the documentation up to date?

The online manual is always expected to be up to date with the last ObjectDB version.  First, I've ... , because an object is identified as dirty by comparing its old content with the current content. With enhanced ... when a setter is called with the field's current value, I can test for equality inside the setter, like

log entry date/time

It would be very useful if each entry in the log file has a date /time stamp. Thanks, Carl   FastModel Ben Schreiber Version 2.2.2 adds date /time stamps to the log. Thank you for your suggestion. support Support

In version 2.5.2_05 does not work greatest by Date

In earlier versions this query worked fine. In version 2.5.2_05 does not work .orderBy(cb.desc(cb.greatest(root.get("createDate").as( Date .class)))).distinct(true) Thank you for your help. galandor Orlov Sergey Please try build 2.5.2_06 that should fix this regression (of casting to Date ). support Support

ObjectDB current status of the BIRT plugin

ObjectDB current status of the BIRT plugin

_UserException: Attempt to open a database file '...' that is currently in use

_UserException: Attempt to open a database file '...' that is currently in use

JPA Criteria API Queries

;following page sections: Literals and Dates  ( literal , nullLiteral , currentDate , ...). Paths

ORDER BY clause (JPQL / Criteria API)

whose type is comparable (i.e. numbers, strings and date values) and is derived from the SELECT

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 I get the correct result (1 Tag). You find a test case at  . Please start ... cannot be both before and after the date parameter. support Support Hello, to archieve the results the date

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

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

JPA Class Enhancer

.objectdb.Enhancer If objectdb.jar is not in the current directory a path to it has to be specified ... is inferior to the other techniques that are described above. First, currently it only works on Sun JDK

ObjectDB Website - Terms and Conditions of Use

that any of the materials on its web site are accurate, complete, or current . ObjectDB Software may make ... this web site you are agreeing to be bound by the then current version of these Terms and Conditions

date parameter not working (probably) in explorer

in explorer, for a query like this:     select o from ObjectNode o where o.classIdentifier = '(PR)' and o.created ?1 we try to set the parameter (its a java.util. Date ) in ... '. A workaround for previous versions is to use a date literal (embedded in the query) instead of a date parameter. support Support

jakarta.persistence.EntityManager

that is currently associated with a persistence context. A detached entity is an instance with a persistent ... to the current persistence context. Parameters: entity - entity instance Returns: boolean value indicating ... if invoked on an entity manager which has not been joined to the current transaction and a lock mode

jakarta.persistence.Basic

, or Year Date or Calendar , java.sql. Date , java.sql.Time , or java.sql.Timestamp , byte[] or Byte ... getName() { return name; } The use of Date , Calendar , java.sql. Date , java.sql.Time , java.sql.Timestamp ... should use the date /time types defined in the package java.time , or the primitive array types char

jakarta.persistence.Temporal

of type Date and Calendar . It may only be specified for fields or properties of these types ... : @Temporal( DATE ) protected java.util. Date endDate; Deprecated: Newly-written code should use the date ... Date or Calendar . Since: Jakarta Persistence (JPA) 1.0 Additional JDK methods inherited from java

JPA Lifecycle Events

that should be applied by default to all the entity classes. Currently , default listeners can only be specified in

Database Transaction Replayer

is not in the current directory a path to it has to be specified. The tool's main class is com

Storing JPA Entity Objects

is thrown. The exception is thrown either by persist (if that existing entity object is currently

What are the system requirements for using ObjectDB?

ObjectDB requires Java 8 or later. As a pure Java application, ObjectDB should be able to run on any platform that supports the Java Standard Edition. Either the Java Development Kit (JDK) or the Java Runtime Environment (JRE) can be used. A version of ObjectDB for .NET is currently under development.

Database Doctor

is not in the current directory a path to it has to be specified. The tool main class is com.objectdb

Can I use ObjectDB with languages other than Java?

ObjectDB can be used by Java Virtual Machine (JVM) languages, such as Java, Kotlin, Groovy and Scala. It can also be used with other languages, such as Python, JavaScript, Ruby and PHP, but currently only with their JVM implementations (e.g. Jython for Python, GraalVM for JavaScript

Entity Management Settings

, even if it is not specified explicitly at the command line. This is currently an experimental feature

Database Server

: $ java -cp objectdb.jar com.objectdb.Server If objectdb.jar is not in the current directory a path

jakarta.persistence.MapKeyTemporal

of type Date and Calendar . It may only be specified for map keys of these types. The MapKeyTemporal ... with the ElementCollection , OneToMany , or ManyToMany annotation. Example: @OneToMany @MapKeyTemporal( DATE ) protected Map employees; Deprecated: Newly-written code should use the date /time types defined in java

jakarta.persistence.Embeddable

EmploymentPeriod { @Temporal( DATE ) java.util. Date startDate; @Temporal( DATE ) java.util. Date endDate

jakarta.persistence.TemporalType

Type used to indicate a specific mapping of Date or Calendar . Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0 The JPA Persistable Types article explains how to use TemporalType . Enum Constants DATE Map as java.sql. Date

jakarta.persistence.criteria.CriteriaBuilder.currentDate()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression currentDate() Create expression to return current date . Returns: expression for current date . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.localDate()

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression localDate() Create expression to return current local date . Returns: expression for current date . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Id

primitive wrapper type; String ; UUID ; Date ; Date ; BigDecimal ; BigInteger . The mapped column

jakarta.persistence.IdClass

Date birthDay; ... } public record EmployeePK(String empName, Date birthDay) {} See Also: EmbeddedId

jakarta.persistence.criteria.TemporalField

Jakarta Persistence (JPA) Interface jakarta.persistence.criteria.TemporalField Type Parameters: - the resulting type of the extracted value - the temporal type ( date , time, or datetime) Each instance represents a type of field which can be extracted from a date , time, or datetime

jakarta.persistence.criteria.LocalDateTimeField

which can be extracted from a LocalDateTime . Since: Jakarta Persistence (JPA) 3.2 Public Static Fields DATE The date part of a datetime. Since: Jakarta Persistence (JPA) 1.0 DAY The calendar day of the month

JPA Web App Tutorial - Maven Project

: mvn package jetty:run The current directory should be  guestbook-web (containing the  pom

Java EE JPA Tutorial - Maven Project

the command line: mvn package The current directory should be  guestbook-jee6

Getting Started with JPA - Maven Project

The current directory should be points-console (containing the pom.xml file). No need to download

Spring MVC JPA Tutorial - Maven Project

jetty:run The current directory should be  guestbook-spring (containing the  pom.xml file