About managed

tutorial

Step 2: Entity Class and Persistence Unit

Explains how to define a JPA entity class and a persistence unit (persistence.xml) in an Eclipse Spring MVC web application project. To store objects in an ObjectDB database using JPA we need to define an entity class: Right click the project node (in the [Package Explorer] window), select  New > Source Folder , enter src/main/java as Folder ...

 
tutorial

Step 2: Entity Class and Persistence Unit

To store objects in an ObjectDB database using JPA we need to define an entity class: Open the [New Java Class] dialog box, e.g. by right clicking the project node (in the [Package Explorer] window) and selecting  New > ...

 
forum_thread

How to Use a SF with extended Persistence Context?

Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. The need for an extended persistence Context emerges for the need to create queries in advance for fast execution so I need to store the queries and I need an EntityManager that doesn't get closed between calls. When I call the SF directly no problem happens but if I use SL to hold a reference to the SF I get com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active. #1 2013-11-24 06:05 Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. T ...

 
issue

New entity objects are duplicated on merge cascading

When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... can also cause an "Attempt to persist a reference to a non managed ..." exception, when the duplicated object is referenced from another ...

 
forum_thread

JPA JPQL WHERE clause for IN :variable not working if variable is a list of Enums

Hi, I have a case where I have a JPQL query like: "select o from MyEntity o WHERE (enumField IN :enumFieldList)" And enum field is defined in MyEntity as: @Enumerated(EnumType.STRING) @Column(nullable = false) @Index private MyEnumType enumField; And MyEnumType is defined as: public enum MyEnumType { VALUE1, VALUE2, VALUE3, VALUE4 } and I call: ... 2015-04-07 11:34 I managed to reproduce the issue and found the @Enumerated(EnumType.STRING) ...

 
manual

FROM clause (JPQL / Criteria API)

Explains how to use the FROM clause and JOIN expressions in a JPA/JPQL query. The FROM clause declares query identification variables that represent iteration over objects in the database. A query identification variable is similar to a variable of a Java enhanced for loop in a program, since both are used for iteration over o ...

 
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: ... 19:53 If the list is managed as an inverse (mapped by) field - you should be able to use an update ...

 
forum_thread

Embedable & Reference?

Hi! I've got a situation I do not understand. Assume code like this: ... the database and later each one of them is retrieved and managed separately. This is one of the consequences of not having ...

 
forum_thread

Create simple index for a Id field

Hello, I just wanted to write another anotation to my key field so I can have a really simple index. This is the original code: @Entity public class ObjectDbEntity<Key,Value> implements DataItemProvider<Value> {         @Id     private Key key = null;     private Value value = null; and I just want my key to be indexed on my db, just like this: #1 2014-10-09 00:06 Hello, I just wanted to write another anotation to my key field so I can have a really simple index. This is the ...

 
manual

General Settings and Logging

Describes general configuration and logging of the ObjectDB Java object database for JPA and JDO. the ObjectDB General configuration section. The <general> configuration element specifies ObjectDB settings that are relevant to both the server side and the client side. The default configuration file contains the following <general> element: <general ...