ObjectDB Database Search

1-50 of 194 results

Date and Time in JPQL and Criteria Queries

the results of predefined JPQL functions that return the current date and time. Current date and time ... when the query is executed: CURRENT _ DATE : Returns the current date as a java.sql. Date instance. CURRENT _TIME ... for building date and time expressions that represent the current date or time: // Create current date

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

;  Parameter param ,    Date value ,    TemporalType temporalType ) Bind an instance of Date to a Parameter object. Parameters: temporalType - temporal type param - parameter ... should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

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

;  String name ,    Date value ,    TemporalType temporalType ) Bind an instance of Date to a named parameter. Parameters: name - parameter name temporalType - temporal type ... 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(int,Date,TemporalType)

;  int position ,    Date value ,    TemporalType temporalType ) Bind an instance of Date to a positional parameter. Parameters: position - position temporalType - temporal ... 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.StoredProcedureQuery.setParameter(int,Date,TemporalType)

setParameter (    int position ,    Date value ,    TemporalType temporalType ) Bind an instance of java.util. Date to a positional parameter. Parameters: position ... if the value argument is of incorrect type. Deprecated: Newly-written code should use the date /time

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

setParameter (    Parameter param ,    Date value ,    TemporalType temporalType ) Bind an instance of Date to a Parameter object. Parameters: temporalType - temporal ... : Newly-written code should use the date /time types defined in java.time . Since: Jakarta Persistence (JPA) 1.0

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

setParameter (    String name ,    Date value ,    TemporalType temporalType ) Bind an instance of java.util. Date to a named parameter. Parameters: name - parameter name ... if the value argument is of incorrect type. Deprecated: Newly-written code should use the date /time types

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

JPA Persistable Types

`, ` Date `, and math types. Multi-value types: Collections, maps, and arrays. Miscellaneous types: Enum ... .util. Date , java.util.Calendar , java.sql. Date , java.sql.Time , java.sql.Timestamp, java.time ... .OffsetDateTime , java.time.Instant. Date and time types are discussed in more detail in the next section. Date

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

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

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

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

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

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

FROM clause (JPQL / Criteria API)

_LENGTH, BOTH, BY, CASE, CHAR_LENGTH, CHARACTER_LENGTH, CLASS, COALESCE, CONCAT, COUNT, CURRENT _ DATE , CURRENT _TIME, CURRENT _TIMESTAMP,DELETE, DESC, DISTINCT, ELSE, EMPTY, END, ENTRY, ESCAPE, EXISTS, FALSE ... only over the neighbors collection for the current c1 . In this case, propagating the WHERE constraint to the FROM

JPA Attributes Annotations

used to specify the storage format for enumerated types. Temporal mapping Map legacy date ... ): Specifies the database SQL type for a persistent field or property of type java.util. Date or java.util.Calendar . Specifies the database SQL type for a map key of type java.util. Date or java.util.Calendar

Index Definition

( name ="u2") Date indexedField5; // unique } The @Unique annotation defines a unique index ... .util. Date , java.sql. Date , java.sql.Time , java.sql.Timestamp Any enum type A reference

JPA Query Expressions (JPQL / Criteria)

on the following pages: Literals and dates ( literal , nullLiteral , currentDate , …) Paths, navigation ... ) String expressions ( like , length , locate , lower , upper , concat , substring , …) Date and time

Apache License, Version 2.0, January 2004

to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution

Schema Update

, the instructions should usually be on the client side, where the up-to- date classes are located. The following

JPA Metamodel Types

, Strings, or Dates ) that do not contain persistent attributes of their own. An enumeration

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

General Performance Issues Illustrated with a Specific Method

listPatientsByIDsWithBasicData(String ids) { Long st = new Date ().getTime(); System.out.println ... ); System.out.println("cs size = " + cs.size()); Long ed = new Date ().getTime(); System.out.println ... java.io.Serializable; import java.util. Date ; import javax.jdo.annotations.Index; import javax

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

Database Transaction Replayer

.objectdb.Replayer my.odb If objectdb.jar is not in the current directory, you must specify a path

Storing JPA Entities

. The exception is thrown either by persist , if the existing entity is currently managed by

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

, then the EntityManager is associated with this current transaction. If the given function returns ... : synchronizationType - how and when the entity manager should be synchronized with the current JTA ... - how and when the entity manager should be synchronized with the current JTA transaction map - properties

jakarta.persistence.EntityTransaction

(JPA) 1.0 void commit () Commit the current resource transaction, writing any unflushed changes ... fails. Since: Jakarta Persistence (JPA) 1.0 boolean getRollbackOnly () Determine whether the current ... back the current resource transaction. Throws: IllegalStateException - if isActive is false. PersistenceException

Step 2: Entity Class and Persistence Unit

.Serializable; import java.sql. Date ; import javax.persistence.Entity; import javax.persistence ... String name; private Date signingDate; // Constructors: public Guest() { } public Guest(String name) { this.name = name; this.signingDate = new Date (System.currentTimeMillis()); } // String Representation

jakarta.persistence.EmbeddedId

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

jakarta.persistence.EntityExistsException

. The current transaction, if one is active, will be marked for rollback. If the entity already exists ... the EntityExistsException or another PersistenceException may be thrown at flush or commit time. The current transaction

combined index not used

the current date (in your case the date of the last Action). The endDate is created as soon as an Action ... :notNull])" eval="0.9675" variable="a" / = current -java.sql. Date )),(a.state=3)),(a.subType=3)),(a.type=0 ... ="[]" = current -java.sql. Date )),(a.state=3)),(a.subType=3)),(a.type=0)) v$1:bound(a.objectsInCharge

jakarta.persistence.TypedQuery.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.TypedQuery.setParameter(Parameter,Calendar,TemporalType)

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

jakarta.persistence.TypedQuery.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

jakarta.persistence.Temporal.value

Jakarta Persistence (JPA) Method in jakarta.persistence.Temporal TemporalType value The type used in mapping Date or 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.PersistenceContext.synchronization

synchronized with the current transaction or whether the persistence context must be explicitly joined to the current transaction by means of the EntityManager.joinTransaction method. Default

jakarta.persistence.PessimisticLockException

may be thrown as part of an API call, a flush or at commit time. The current transaction, if one is active

jakarta.persistence.FlushModeType

is unspecified. If there is no transaction active or the persistence context is not joined to the current

jakarta.persistence.LockTimeoutException

. The current transaction, if one is active, will be not be marked for rollback. Since: Jakarta Persistence

jakarta.persistence.EntityNotFoundException

and the entity no longer exists in the database. The current transaction, if one is active

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