ObjectDB ObjectDB

Internal Website Search

1-10 of 61 resultsRefresh
175

java.sql.Timestamp.getTime() not working

Hi, I need to work with Timestamp diff in two entity fields, but this queries SELECT count(p ... (TemporalType.TIMESTAMP) public Timestamp loginAt; @Temporal(TemporalType.TIMESTAMP) public Timestamp registeredAt = AppCore.getTime(); ... } Is there some other way to compare two Timestamps
172

java.sql.Timestamp with milliseconds

/Timestamp.html) @Id @Column(name = "STMP") @Temporal(TemporalType.TIMESTAMP) private Timestamp timestamp ... .Timestamp, but I would like to use a single Date/Time field (ie, not milliseconds since the Epoch) klonq ... ();     }         @Entity     public static class MyEntity {         @Id Timestamp time = new
168

auto generate timestamp

Hi all, How can I create auto timestamping column? I want the database to generate the timestamp. I ... /811845/setting-a-jpa-timestamp-column-to-be-generated-by-the-database - Pawel pawel Pawel Hryniszak ... the timestamp in an ordinary Date / Timestamp field and update it in an event callback method (@PrePersist
157

Possible issue with timestamps

(TemporalType.TIMESTAMP)         public Date getCreationDate() {             return creationDate
96

TemporalType.TIMESTAMP

Enum Constant javax.persistence.TemporalType TIMESTAMP Map as java.sql.Timestamp Since: JPA 1.0
40

JPA Persistable Types

.Time, java.sql.Timestamp. Date and time types are discussed in more detail in the next paragraph. Date ... only (e.g. 23:59:59). java.sql.Timestamp - represents date and time (e.g. 2019-12-31 23:59:59). The java ... time3; // Date and Time: java.sql.Timestamp dateAndTime1; @Temporal(TemporalType
35

Date and Time in JPQL and Criteria Queries

(a java.sql.Time instance). CURRENT_TIMESTAMP - is evaluated to the current timestamp, i.e. date and time (a java.sql.Timestamp instance). Extracting Date Parts JPA doesn't define standard methods ... current date & time expression: Expression<javax.sql.Timestamp> ts = cb.currentTimestamp
31

Literals in JPQL and Criteria Queries

'} Timestamp - {ts 'yyyy-mm-dd hh:mm:ss'} - for example: {ts '2020-01-03 13:59:59'} Enum Literals JPA 2 adds ... <java.sql.Timestamp> now = cb.literal(new java.sql.Timestamp()); // Enum literal: Expression
25

ObjectDB Object Database Features

.util.Date, java.sql.Date, java.sql.Time and java.sql.Timestamp. Math types: java.lang.BigInteger ... .Timestamp. Math: java.lang.BigInteger and java.lang.BigDecimal. Auto Value Generation Modes
17

FROM clause (JPQL / Criteria API)

, CHARACTER_LENGTH, CLASS, COALESCE, CONCAT, COUNT, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP

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