property « Transaction « JPA Q&A

1. How to use the Hibernate optimistic locking version property on the front end?

Optimistic locking using the version attribute for an entity works fine and is easy to implement:

<version property="VERSION" type="int" column="EX_VERSION" />
The entity has a property of the following type:
private int VERSION;
public int ...

2. How to get Hibernate configuration properties?

I`m using hibernate with jpa, and it is configured with persistence.xml Is it possible to get hibernate connection properties from web application? Thanks.

3. Detach JPA objects with lazy initialized properties

There are two JPA entities: User and Order with one-to-many relationship.

 * User DTO
public class User implements Serializable {
    private static final long serialVersionUID = 8372128484215085291L;


4. Hibernate Transaction information

Given that you have a lot of domain objects, that all interact with one another, it would be very useful to know which objects have changed in a particular transaction. Is this ...

5. how to use the hibernate optimistic-lock property?

I am unable to find enough documentation to fully understand it.

6. JTA Transaction Properties

7. JTA Transaction Properties

8. JTA Transaction Properties

9. turn off transaction in properties?

I am using Hibwrnate 2.14 and try to have some sort of flags in properties file that can turn off and on Hibernate transaction (since we are trying to use EJB to control transactions for some reason). Is there any way I can do that in or hubernate.cfg.xml? Or I have to use my own properties to get the flag ...

10. Configuring AutoCommit property.

11. Property-level optimistic-lock bindings

Newbie Joined: Wed Apr 06, 2005 11:57 am Posts: 2 I am having issues with the new property-level optimistic-lock setting in conjunction with the class-level optimistic-lock="all" setting. First, let me explain why I'm considering using the optimistic-lock="all" setting (as opposed to the optimistic-lock="version" setting) and why the property-level optimistic-lock setting looks appealing. I have a legacy database which already has a ...

12. Problem with optimistic-lock=false on property?

I think I may have run into a bug. I have an entity mapped with optimistic-lock="all" and one property excluded with optimistic-lock="false". When flush is called, I get an exception that 'ORA-01006: bind variable does not exist'. Looking at the log(see below), I can see that hibernate is attempting to bind an extra parameter. When I set optimistic-lock=true on the property, ...

13. How to use optimistic-lock property for collection

I have parent-child relation at java level and in hibernate mapping i have .... ....

14. How to Unset/Rollback Individual Property Changes?

We have a requirement to unset individual property values in our POJOs. We don't want to rollback the entire object graph or transaction, just rollback individual property changes. Our ultimate goal is not so much to access prior values as to stop certain property changes from being persisted. Is there some feature of Hibernate that could help us do this? Or ...

15. Config. property "hibernate.transaction.auto_close_session"

Hello, I use Hibernate3. I configure the property "hibernate.transaction.auto_close_session" in the hibernate.cfg.xml file and I put its value to "false". I don't want close session automatically. But it don't work. Any idea? My hibernate.cfg.xml is events jdbc:mysql://localhost/scop Events false false ...