About mapping

forum_thread

Null returned by Persistence.createEntityManagerFactory

Hi, So I'm currently having an issue where createEntityManagerFactory returns null. When I run the application on the my local machine through Tomcat it works fine, the odb file is created.    #1 2014-06-12 18:11 Hi, So I'm currently having an issue where createEntityManagerFactory returns null. When I run the ap ...

 
forum_thread

@MappedSuperclass and @Transient not working as I expected

The problem could be my expectation, since I'm fairly inexperienced with JPA.  But here is the problem: The base class of my entity hierarchy is annotated as @MappedSuperclass, and one of its fields is annotated @Transient.  I expected that when I persist a subclass, no table would be created for the superclass, and the transient field would not appear in any table. The actual result is that there is a table for the superclass.  When I try to examine it in ObjectDB Explorer, it throws a NPE. #1 2011-07-30 07:51 The problem could be my expectation, since I'm fairly inexperienced with JPA.  But here is the problem: ...

 
forum_thread

Schema migration - long to String

Hi, I need to change field type in our model from long to String. After changing filed type in our model and repairing database with doctor, most of our entities is gone. Doctor puts some errors on console: #1 2013-01-02 18:39 Hi, I need to change field type in our model from long to String. After changing filed type in our model ...

 
forum_thread

@AttributeOverrides , and postgresql + own TYPE

Hello,  first of all i want to thank for this is site. I'm begginer in Java and also in JPA and this site is very helpful for me. Now What is my problem. Unfortunately  i have to work with postgresql + JPA + eclipselink, because is my school project. Database is final and i can't do any changes even if i wanted to. In structure of DB  is this. -- -- Name: address; Type: TYPE; Schema: artio; Owner: facman --   ... can store your objects as is without the need to handle mapping issues. However, this forum is for ObjectDB users not for ...

 
forum_thread

Groovy JPA example

I've been using Groovy with ObjectDb, just thought I'd post a short snippet to show how easy this is to do. The following script (which is one import and one statement) will open a database, run a query and print some results. --------------------------------------------------------------- import javax.persistence.Persistence #1 2011-10-10 05:21 I've been using Groovy with ObjectDb, just thought I'd post a short snippet to show how easy this is to d ...

 
issue

ClassCastException after upgrade to 2.3.5_03

On upgrading to the latest version of objectdb I get the following exception on object retrieval: Bug Version: Priority: Normal Status: Fixed Replies: 1 Type:  Bug ...

 
forum_thread

Modifier operations

Hi, Today I was reading about different NoSQL databases. One of those database - MongoDB - has a very nice feature, especially for web applications - modifier operations. The whole trick for those operations is to change some value in object without pulling this object from database. So for example we have class: public class WebVisit { public String url; // key public int visitsCount; } As for now I have to pull this class from database: #1 2011-09-12 18:27 Hi, Today I was reading about different NoSQL databases. One of those database - MongoDB - has a very nic ...

 
issue

Issue with DISTINCT Select

It is getting more and more frustrating :( We've introduced distinct select instead of regular selection in our code (no changes else) and suddenly receive invalid identifiers in queries exceptions in various queries. Here's the stacktrace: Bug Version: Priority: Normal Status: Closed Replies: 12 Type:  Bug ...

 
issue

Query Execution Error

This query Bug Version: 2.3.6 Priority: Normal Status: Fixed Replies: 4 Type:  Bug ...

 
forum_thread

EmbeddedId with Generated field value

@Entity public class A { @EmbeddedId private Id id; } @Embeddable public class Id { @Generated private long id; private String zone; } How can I get the field Id.id auto-incremented?   #1 2012-12-06 17:29 I know the following 2 ways to declare a composite Primary key: ********* Solution 1 ********* @ ...