About int

forum_thread

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?... If you want to store a timezone you may use a separate int field. ObjectDB Support ObjectDB - Fast ...

 
forum_thread

Index on map key

Is there a way to create an Index with @Index on the key of a map? ... begin ( ) ; for ( int i = 0 ; i < 100000 ; i ++ ) { ...

 
forum_thread

Fetching Collections Puzzle

I am working on a project where I need to travel through a massive graph of objects. One of the main entity is the Node which is shown below. class Node { Node parent List<Node> children Node rightSibling Node leftSibling int rank } I have the following issues/doubts ... children Node rightSibling Node leftSibling int rank } I have the following issues/doubts ...

 
forum_thread

Unable to store AtomicInteger

In the docs, all serializable types should be persistable. However, when I tried to persist a field of type AtomicInteger, I got the following message: Message: Failed to commit transaction: Attempt to store an instance of a non persistable type java.util.concurrent.atomic.AtomicInteger I am using ObjectDB 2.6. Is this a bug? ... not an entity class, the other alternative is to store an int then from the entity call an extra setup function in @PostLoad, which is ...

 
forum_thread

Iterating over large result set

Hi, Few days ago I was writing some code to iterate over quite a large dataset. Fitting those data in memory was quite a challenge even with 3GB heap space. So I did paging using two loops. ... So I did paging using two loops. for ( int page = 0 ; page < resultCount ; page += pageSize ) ...

 
forum_thread

java.lang.UnsupportedOperationException

com.objectdb.o.InternalException: java.lang.UnsupportedOperationException: Unsupported feature - Update queries are not supported yet java.lang.UnsupportedOperationException: Unsupported feature - Update queries are not supported yet. Used with this code: "DELETE l FROM License l WHERE l.id = ?1", License.class); query.setParameter(1, id); int changes = query.executeUpdate(); Is there a workaround? ... setParameter ( 1 , id ) ; int changes = query. executeUpdate ( ) ; Is ...

 
forum_thread

java.sql.Timestamp.getTime() not working

Hi, I need to work with Timestamp diff in two entity fields, but this queries SELECT count(p) FROM Player p WHERE p.loginAt.getTime()-p.registeredAt.getTime()>:value SELECT p.loginAt.getTime() FROM Player p fails with object is not an instance of declaring class but SELECT p.loginAt.getYear() FROM Player p works. How that possible?   ... GenerationType . IDENTITY ) public int id ; @ Temporal ( TemporalType . TIMESTAMP ...

 
forum_thread

How to do multithreading with embedded ObjectDB

Hi, I've tried to implement a counter with ObjectDB, but the following code doesn't work as expected: ... ( 100 ) ; for ( int i = 0 ; i < 100 ; i ++ ) { ...

 
api-jpa

javax.persistence.DiscriminatorColumn

Specifies the discriminator column for the SINGLE_TABLE and JOINED Inheritance mapping strategies.(Annotation of JPA)

 
forum_thread

Error: Failed to write value of field X using reflection (oneToMany relation)

Hi there! I have been all day trying to solve this. I have read multiple sites and documentation, but I can go through this. I have a clase named Pedido, that have a reference ManyToOne to a clase Cliente. ... in special. Just a few variables. String , int , and an embedded class .   The problem is that, ...