ObjectDB Database Search

51-100 of 200 results

Internal exception when updating date filed (TemporalType.DATE)

Hello! ObjectDB version 2.5.3_02. I get internal exception when commiting update Date field (javax.persistence.TemporalType. DATE ). [ObjectDB 2.5.3_02] javax.persistence.RollbackException Failed ... ; List dates = new ArrayList ();         calendar.set(1980, 2, 1

Query filter comparing Dates

Hi, I am using an indexed java.util. Date field in my Entity and I came across some weird behaviour in query filters comparing this Date field. Could You please clarify why are there zero-size result ... am comparing 2 dates which should be equal because they are showing exactly same inner millisecond count

Date field Index is corrupted due to time change

the bug, which affects indexes on pure Date fields (i.e. date with no time). ObjectDB converts pure date values between local time and UTC more than once during transaction commit, and on clock ... that records are being added to the DB at the time of the time change. However, what values in the date

How to add minutes to a Date with JPA2

Hi,  I have to sum to a date of minutes, and check the date obtained is greater than the current date . My idea is as follows: Calendar currentTime = Calendar.getInstance(); Date currenteDate ... ); //minutes to be added I must now sum to the dateCapture the delayMinute and verify that the current date

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 ... greaterEqual or lessEqual with Criteria API will yield in correct results except if the given date

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

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

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

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

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

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

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

jakarta.persistence.criteria.CriteriaBuilder

(JPA) 1.0 Expression currentDate () Create expression to return current date . Returns: expression for current date . Since: Jakarta Persistence (JPA) 1.0 Expression currentTime () Create expression ... temporal ) Create an expression that returns the value of a field extracted from a date , time, or

jakarta.persistence.Basic

java.util. Date or java.util.Calendar , java.sql. Date , java.sql.Time , or java.sql.Timestamp , byte ... String getName() { return name; } The use of java.util. Date , java.util.Calendar , java.sql. Date , java ... discouraged. Newly-written code should use the date /time types defined in the package java.time , or

jakarta.persistence.Temporal

of type java.util. Date and java.util.Calendar . It may only be specified for fields or properties ... is of such a temporal type. Example: @Temporal( DATE ) protected java.util. Date endDate; Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0 The JPA

jakarta.persistence.MapKeyTemporal

of type java.util. Date and java.util.Calendar . It may only be specified for map keys of these types ... : @OneToMany @MapKeyTemporal( DATE ) protected Map employees; Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 2.0 Annotation Elements

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 java.util. Date or java.util.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

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

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.Id

primitive wrapper type; String ; java.util.UUID ; java.util. Date ; java.sql. Date ; java.math.BigDecimal

jakarta.persistence.IdClass

; @Id Date birthDay; ... } public record EmployeePK(String empName, Date birthDay

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

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.criteria.CriteriaBuilder.extract(TemporalField,Expression)

that returns the value of a field extracted from a date , time, or datetime. Parameters: field - a temporal field type temporal - a date , time, or datetime Returns: expression for the value of the extracted field. Since: Jakarta Persistence (JPA) 3.2

jakarta.persistence.EmbeddedId

empName, Date birthDay) {} Example 2: @Embeddable public class DependentId { String name

jakarta.persistence.TypedQuery.setParameter(String,Calendar,TemporalType)

argument is of incorrect type. Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.TypedQuery.setParameter(Parameter,Calendar,TemporalType)

: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.TypedQuery.setParameter(int,Calendar,TemporalType)

argument is of incorrect type. Deprecated: Newly-written code should use the date /time types

jakarta.persistence.Temporal.value

Jakarta Persistence (JPA) Method in jakarta.persistence.Temporal TemporalType value The type used in mapping java.util. Date or java.util.Calendar . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.StoredProcedureQuery.setParameter(int,Calendar,TemporalType)

the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.StoredProcedureQuery.setParameter(String,Calendar,TemporalType)

or if the value argument is of incorrect type. Deprecated: Newly-written code should use the date

jakarta.persistence.MapKeyTemporal.value

Jakarta Persistence (JPA) Method in jakarta.persistence.MapKeyTemporal TemporalType value (Required) The type used in mapping java.util. Date or java.util.Calendar . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.criteria.CriteriaBuilder.greatest(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression greatest (    Expression x ) Create an aggregate expression for finding the greatest of the values (strings, dates , etc). Parameters: x - expression representing input value to greatest operation

jakarta.persistence.criteria.CriteriaBuilder.least(Expression)

Jakarta Persistence (JPA) Method in jakarta.persistence.criteria.CriteriaBuilder Expression least (    Expression x ) Create an aggregate expression for finding the least of the values (strings, dates , etc). Parameters: x - expression representing input value to least operation Returns: least expression. Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.StoredProcedureQuery.setParameter(Parameter,Calendar,TemporalType)

of the query. Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Query.setParameter(String,Calendar,TemporalType)

is of incorrect type. Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

jakarta.persistence.Query.setParameter(int,Calendar,TemporalType)

is of incorrect type. Deprecated: Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0