About Persistence Context

forum_thread

Weird behaviour with enhanced classes and embedded entities

Hi, I've found some weird behaviour in my project (www.tinymediamanager.org): Sometimes some entries of my ArrayLists with embedded entities are missing. I've hunted the problem down to an enhanced/proxied list in my entity which contains embedded entities and some .add(obj) are simply failing. Here is a small sscce which reproduces the issue: ... concurrent . TimeUnit ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Many clients access same database

Hi, I have a program to manage clients of my tennis club. But we have several different computer programs open that access the database. How can I implement this topology so that there is one Persistence context for all the client programs on the different computers. For example: When I change the name of a client on 1 computer, that change has to be discovered by the other client programs as well. How is this possible? ... How can I implement this topology so that there is one Persistence context for all the client programs on the different computers. For ...

 
forum_thread

EntityManager refresh problem

Dear Support, in the following code you can see a EntityManager.refresh() example. The example throws an assertion error with the following statement: Assert.assertEquals("entity 1", simpleEntity1.getFieldA()); In my opinion there should be no assertion error. I have tested the example with several objectdb versions (2.5.4, 2.5.6_06 and 2.5.7). Do you have an explanation for the assertion error? ... java. io . File ;   import javax. persistence . EntityManager ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Dependency from enhanced classes to the objectDB library

Hello, we have a Question to the dependency from enhanced classes (required for license) to the objectDB library.... domains. Each domain is split into business layer and persistence layer (others are not relevant here). Per domain and per layer, we ... the entity classes, so it will be found using the thread context class loader (which is also used to load the classes). To ...

 
forum_thread

EntityManager JPA or JDO impl and different behavior

Hi, I have an issue with the EntityManager. My persistance XML looks like: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> ... = "1.0" encoding = "UTF-8" ?> <persistence version = "2.0" xmlns = "http://java.sun.com/xml/ns/persistence" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Left join fetch behaviour doesn't retrieve children?

Hello support, I'm a little bit confused about a left join fetch behaviour. In this test case, i try to fetch my 3 children using a left join fetch. But my collection is null after closing the em. It was expected to be fetched before closing the em, no ? In fact, that is the objective of the fetch purpose (i guess ?). ... java. util . Set ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Wrong data stored in time only fields

This may be related to the fix for the problem described in this thread: Wrong data stored in date only fields. The object and its date and time fields are the same as in the referenced thread. Except we are using ObjectDB 2.6.4_08, the system time zone is set to EST and both the OS and JVM are using the 2015g time zone data. ... java. util . List ;   import javax. persistence . Basic ; import javax. persistence . Entity ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

Strange Error with Criteria API and Sorting

We're creating a simple selection (distinct) including an order clause. When watching the created criteria in debugger we get the correct expression: SELECT DISTINCT $1 FROM MyEntity $1 WHERE ((TYPE($1)=class test.MyEntity)) ORDER BY UPPER($1.name) DESC You can see that in the order by there's correctly a "$1" var. Running this (without the type thing before) in the explorer correctly returns the sorted results. However, running this with the criteria API produces this error: ... java. util . List ;   import javax. persistence . Entity ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

Removing of an entity removes also another entity type

Hello, we have following case: ToleranceDefinition and ResolverMapping are entities and have not any relations each other. Before start transaction the ToleranceDefinition entities exist already in the database. ... may not be aware that a cached entity object in its persistence context has been modified by an UPDATE query. Therefore, it is a good practice ...

 
forum_thread

Need help to make this test work and define proper annotations for entities Lists

Hi, I can't get this simple test case to work, i know it is probably due to the lack of proper annotations on entities list, could anyone help me to define them? NB in this test case I didn't set all entities methods for the sake of clarity, also in actual application no field are public nor static and no entity is static.    ... import java. util . List ; import javax. persistence . Entity ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...