Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@DynamicInsert @DynamicUpdate does not work?

Tags:

hibernate

I am using Hibernate 4. When I use

    @org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true,
 selectBeforeUpdate = true)

it works.

But, I found that they have deprecated, so I follow the instructions to use the @DynamicInsert and @DynamicUpdate, like this:

@Entity
@DynamicInsert
@DynamicUpdate
@SelectBeforeUpdate 
@Table(name = "User")
public class User {
       ..........
}

It does not work.

How do I use @DynamicInsert and @DynamicUpdate ?

like image 593
user1159818 Avatar asked Jan 20 '12 02:01

user1159818


1 Answers

They are broken in the current released version (4.1.0 through 4.1.3). The issue is https://hibernate.atlassian.net/browse/HHH-7074

EDIT: updated the link to the current url. This was fixed in hibernate 4.1.4

like image 138
steve_ash Avatar answered Nov 06 '22 17:11

steve_ash