Internal Website Search

51-100 of 200 results

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

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

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

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

JPA Class Enhancer

.objectdb.Enhancer If objectdb.jar is not in the current directory a path to it has to be specified ... above. First, currently it only works on Sun JDK 6 or above (and not on JRE 6 for example). Second

Can I use ObjectDB with languages other than Java?

, but currently only with their JVM implementations (e.g. Jython for Python, JRuby for Ruby and Quercus for PHP). A version of ObjectDB for .NET is currently under development and future support

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

JPA Lifecycle Events

are listeners that should be applied by default to all the entity classes. Currently , default

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 5 or later (Java 6 is preferred). 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

Entity Management Settings

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

Database Server

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

javax.persistence.criteria.CriteriaBuilder

() Create expression to return current date . Return: expression for current date Since: JPA 2.0 Expression currentTime () Create expression to return current time. Return: expression for current time Since: JPA 2.0 Expression currentTimestamp () Create expression to return current timestamp. Return

javax.persistence.Query

LockModeType getLockMode () Get the current lock mode for the query. Returns null if a lock mode ... to a parameter of the query Since: JPA 2.0 Query setParameter ( Parameter  param,  Date  value,  TemporalType  temporalType) Bind an instance of java.util. Date to a Parameter

javax.persistence.TypedQuery

and hints Inherited from: Query Since: JPA 2.0 LockModeType getLockMode () Get the current lock mode ... to a parameter of the query Since: JPA 2.0 TypedQuery setParameter ( Parameter  param,  Date  value,  TemporalType  temporalType) Bind an instance of java.util. Date to a Parameter

javax.persistence.StoredProcedureQuery

Since: JPA 2.0 LockModeType getLockMode () Get the current lock mode for the query. Returns null ... of the query Since: JPA 2.1 StoredProcedureQuery setParameter ( Parameter  param,  Date  value,  TemporalType  temporalType) Bind an instance of java.util. Date to a Parameter object

CriteriaBuilder.currentDate() - JPA Method

JPA Method in javax.persistence.criteria.CriteriaBuilder Expression currentDate () Create expression to return current date . Return: expression for current date Since: JPA 2.0

javax.persistence.EntityManager

;entity) Check if the instance is a managed entity instance belonging to the current persistence ... on an entity manager which has not been joined to the current transaction and a lock mode ... if invoked on an entity manager which has not been joined to the current transaction and a lock mode

javax.persistence.Temporal

must be specified for persistent fields or properties of type java.util. Date and java.util.Calendar ... (when the element collection value is of such a temporal type. Example: @Temporal( DATE ) protected java.util. Date endDate; Since: JPA 1.0 The JPA Persistable Types article explains how to use Temporal

javax.persistence.Embeddable

of an embeddable class. Example 1: @Embeddable public class EmploymentPeriod { @Temporal( DATE ) java.util. Date startDate; @Temporal( DATE ) java.util. Date endDate; ... } Example 2: @Embeddable public

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

javax.persistence.TemporalType

.TemporalType Type used to indicate a specific mapping of java.util. Date or java.util.Calendar . Since: JPA 1.0 The JPA Persistable Types article explains how to use TemporalType . Enum Constants DATE Map as java.sql. Date Since: JPA 1.0 TIME Map as java.sql.Time Since: JPA 1.0 TIMESTAMP Map as java.sql

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

[ODB1] Chapter 5 - JDO Connections

lock is expected to be exclusive. Therefore, any attempt to modify an object that is currently in ... an object that is currently being modified by some other PersistenceManager , blocks the thread

javax.jdo.PersistenceManager

. This method has no effect if the instance is already deleted in the current transaction. This method ... and manipulation outside of a JDO environment. When detaching instances, only fields in the current ... instances must either be in the default-fetch-group , or in the current custom FetchPlan. Parameters: pcs

javax.jdo.spi.StateManager

- the field number currentValue - the current value of the field Return: the new value for the field ... field - the field number currentValue - the current value of the field Return: the new value ... instance field - the field number currentValue - the current value of the field Return: the new value

javax.jdo.Query

, and ignoreCache option. Return: the current setting of the flag Since: JDO 2.0 void setCandidates ... comparisons of Date fields and Date parameters are valid. White space (non-printing characters space ... of the current set of variable values. Other values for variables might still qualify the candidate instance

PersistenceManager.getServerDate() - JDO Method

JDO Method in javax.jdo.PersistenceManager Date getServerDate () Get the Date as seen by ... . Implementations use the setting of the server time zone to prepare a Date instance that represents UTC time on the server. Return: a Date instance corresponding to the UTC Date as seen by the server Since: JDO 2.1

Query.setFilter(filter) - JDO Method

and instances of wrapper classes are valid. Equality and ordering comparisons of Date fields and Date ... if the filter expression returned false for the evaluation of the current set of variable values

javax.jdo.spi.PersistenceCapable

within the current transaction. If the JDO identity is being changed in the transaction, this method returns the object id as of the beginning of the current transaction. Return: a copy of the ObjectId ... jdoGetObjectId if the identity of the instance has not changed in the current transaction. If the JDO

javax.jdo.JDOHelper

, then the ObjectId returned is only valid within the current transaction. Parameters: pc ... resource "META-INF/jdoconfig.xml", using the current thread's context class loader to locate ... , using the current thread's context class loader to locate the PersistenceManagerFactory class