Home » Search

About Entity

161-170 of 200Refresh
Forum
11

Entity has be persistended,but query not fetched?

I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities.But  then the newT is not contain in the query result. Why? code order: query ... ();         em.close();         emf.close();     }         @Entity     static final class User
Forum
11

Fetch a whole entity graph eager

Hello, I have two question at you. Are you provided JPA 2.1 annotation @NamedEntityGraph in next version ObjectDB 3.0? And do you know an easy possibility to get an entirely eager entity graph with all depended entities which we can use as a detached full accessible entity graph outside
Forum
11

How to check if an entity exists in a Database without loading it?

Hi, I am trying to speed up some code - where i check if an entity exists in order to make a decision. In Java - It looks like this (pk - is the primary key of the entity): MyClass find = em.find ... without loading the entity? Thanks   You can use a query: SELECT e.pk FROM MyClass e WHERE e.pk = :pk or SELECT COUNT(e) FROM MyClass e WHERE e.pk = :pk   EKK
Forum
11

Merge of entity classes with "mapped by" very slow

Hi, I have found a strange behavior when merging entities with "mapped by" set on @OneToMany ... - one with mapped by, second with adding entities list without "mapped by". The difference is huge event ... entity objects that are already managed should be very fast. Build 2.4.2_02 fixes it. If the problem
Forum
11

Merge with Parent/Child entities not possible

javax.persistence.Entity; import javax.persistence.EntityManager; import javax.persistence ... ; import org.junit.Before; import org.junit.Test; public class ObjectDbMergeTest { @Entity ... = id;   } } @Entity public static class ChildEntity {   @Id   @GeneratedValue   private
Forum
11

Populating entity id before transaction commit

transaction is committed so all returned entities are not populated with ID in this context. How can I force ODB to populate entity ID before transaction is committed? Or maybe there is another way to finding ID of entity before commit? You can use a SEQUENCE (or TABLE) value generation strategy
Forum
11

Removing an entity throws exception

to remove customer entity, when it's read by a query (it's attached), it throws this exception ... more   After this exception is the entity detached (why?). When I merge it, I can remove it without problems... The Customer class code: @Entity public class Customer implements Serializable { private
Issue
10

An entityManager.flush() with many entities is not possible

  The following exception occures if we call entityManager.flush() where the corresponding JPA PersistenceContext has many entities and relations. What is the reason for the exception? entityManager ... have not found a simple example to reproduce this exception. The entity model of the flushed JPA
Forum
10

Changing existing objects from Entity to Embedded

of another Entity. So as first try I changed only the metadata to this: entity classes) or embeddable
Forum
10

does ObjectDB / JPA support simple password field encryption of an entity class?

We are persisting certain passwords entered by user in a form binded with an entity. Is there any direct ObjectDB support to just encrypt the password field? We would like to either encrypt or make ... have one or two passwords field of an entity to protect. Appreciate any suggestions, Thanks. ObjectDB does not