About int

forum_thread

Wrong @Id type

Hi,  I have noticed some values of id column suddenly switched to int, although it is declared as long in our java class. Do you have idea why this happened? Screenshot attached.   ... have noticed some values of id column suddenly switched to int, although it is declared as long in our java class. Do you have ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in NetBeans.... begin ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { ...

 
forum_thread

Calculating age in query?

Hi! I've got an issue: I have a birthdate as java.sql.Date and a separate field int age. However, of course the age is not accurate because it gets set only once. So what's the best bet (JPA Standard way) to solve the issue of accessing and filtering by an age (having a birthdate) in a query? thanks! Alex ... I have a birthdate as java.sql.Date and a separate field int age. However, of course the age is not accurate because it gets set only ...

 
forum_thread

TreeSet and compareTo() issue

Hi I'm trying to use TreeSet but getting NPE on the compareTo() method when it does a find(): ... looks like this: @ Override public int compareTo ( DropdownValue ddv ) { return ...

 
forum_thread

Update is ignored by ObjectDB

Hi! Sorry for my bad english skills. When I execute fulfilOrder, only Order entity is updated in the database, and User entity remains modified only in code, even if I go: user = smdb.find(User.class, user.id); In this source highlighted lines modifying entity, but not the database. ... Order fulfilOrder ( Long orderID, Long userID, int itemID ) { Order order = shopdb. find ( ...

 
doc

java.lang.Comparable

(Interface of java.langInterface Comparable)

 
forum_thread

Update Entity references if we change the type of an entity

Hello, we must change (extend) our entity model and therefor we convert the type of some entities. As example (like in the attached example): We have an EntityA that have a reference to an EntityB. ... entities have just a ID based reference with a simple 'int' field to this element. And we thought that also the real references ...

 
forum_thread

Closed EntityManagerFactory after upgrading glassfish 3.1.1 to 3.1.2

Hi. I have faced a very serious issue. After upgrading the GlassFish server from 3.1.1 to 3.1.2 this error appears:   ... com.n2nconnect.mm.jpa.ejb.AbstractFacade.findRange(int[]) WARNING: javax.ejb.EJBException at ...

 
api-jdo

jdoCopyKeyFieldsFromObjectId(fm, oid)

Copy fields to an outside consumer from the key fields in the ObjectId.(Method of javax.jdo.spi.PersistenceCapable)

 
forum_thread

Cascading merge() leading to "Attempt to persist a reference to a non managed instance" error

Dear Support Using Objectdb 2.3.4_02 I ran into an exception while performing some tests with a parent/child relationship and cascading merge() operations. The parent has an application defined id, while the child's id is generated, but I don't know if this is of concern. The following "test case" reproduces the error: ... ( "unused" ) private int id ;   @ ManyToOne ( cascade = ...