About begin

forum_thread

Index on map key

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

 
tutorial

Step 4: Add a Servlet Class

Explains how to add a servlet that manages persistence using JPA and ObjectDB to an Eclipse Web Application.... em. getTransaction ( ) . begin ( ) ; em. persist ( new ...

 
forum_thread

Version 2.2.7 build 7/8 issue

Hi all, I have problems with builds 7 and 8 when trying to sort entities with mappedBy and my own method in query. This query "SELECT c FROM Customer c order by c.getNormalizedName()" returns List with null objects! With builds 6 and 5 works it correctly. Removing mappedBy from @OneToOne(mappedBy = "address") also helps. My code: ...   em. getTransaction ( ) . begin ( ) ; Customer c = new Customer ...

 
issue

Eager Fetch of Map with Entities as Keys

Loading eagerly a map that uses entity objects as keys is currently unsupported, if the equals and hashCode method of the keys are based on the key entity content, since it is unavailable during instantiation of the map. The following test case demonstrates the problem: ... ; em. getTransaction ( ) . begin ( ) ; MyEntity entity = new ...

 
api-jdo

javax.jdo.spi.StateManager

This interface is the point of contact between managed instances of PersistenceCapable classes and the JDO implementation.(Interface of JDO)

 
forum_thread

Access entity version before commit transaction

Hi, I have a usecase where I need to write the updated entity id to the database before commiting the transaction: 1. Change entity field e.g. from a to b 2. Create a change entry in database containing the new version of the entity ... just creates a transaction (entityManager.getTransaction().begin();) and commits it automatically at the end ...

 
api-jdo

getObjectId(pc)

The ObjectId returned by this method represents the JDO identity of the instance.(Method of javax.jdo.PersistenceManager)

 
forum_thread

How to Remove records from many to many relationship tables in JPA

Hello All, I am getting the constraint violation exception whil deleting the entries I have Relation tables    TransportationEvent  and Conclusion  , relations like ... entityManager. getTransaction ( ) . begin ( ) ; entityManager. remove ( ...

 
forum_thread

ClassCastException: cannot be cast to com.objectdb.spi.TrackableUserType

Hello, I have a class TherapeauticDrugScreenRqst with two other nested subclasses - all using Groovy. My first attempt to persist TherapeauticDrugScreenRqst to Objectdb 2.2.8 is successfully. However, although my method to store the method is shown below: ... try { transaction. begin ( ) pm. makePersistent ( instance ...

 
forum_thread

Bug with unique constraint exception not resulting in transaction roll back

I'm using ObjectDB 2.5.6_02 and running into a bug with a JDO @Unique constraint.  I'm using JPA in general. I have an EJB persisting two entities with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) declared on the EJB method.  The two entities have the same value for the field with the @Unique constraint. The unique constraint causes an exception as expected, but I would expect ObjectDB to roll back the transaction and not persist anything.  However, it is persisting both entities. #1 2014-06-27 17:30 I'm using ObjectDB 2.5.6_02 and running into a bug with a JDO @Unique constraint.  I'm using JPA in ...