-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: dynamicInsert and dynamicUpdate does not WORK
PostPosted: Tue May 17, 2005 9:36 am 
Newbie

Joined: Wed Apr 06, 2005 1:13 pm
Posts: 13
Hi,

I don´t know if I´m doing something wrong, but form me the hibernate does not exclude columns with null value from the insert or update SQL statement.
I think that i possible is missing something.
Below is the relevant part of my POJO.

Thanks

@Entity
@org.hibernate.annotations.Entity ( dynamicInsert = true, dynamicUpdate = true )
@Table (name = "USERS")
@javax.persistence.GeneratedIdTable(
name="GEN_TABLE",
table = @Table(name="VENUS_IDS"),
pkColumnName = "KEY_ID",
valueColumnName = "LAST_VALUE"
)
@javax.persistence.TableGenerator(
name="USERS_GEN",
tableName="GEN_TABLE",
pkColumnValue="ID_USER",
allocationSize=1
)
public class UserVO implements Serializable {

private Integer id_user;
private String login;
private String email;
private String passwd;
private Timestamp creation_timestamp;
private Timestamp last_change_timestamp;

@Column (name = "creation_timestamp", nullable = true, unique = false)
public Timestamp getCreation_timestamp() {
return creation_timestamp;
}

@Column (name = "email", nullable = false, length=100, unique = false)
public String getEmail() {
return email;
}

@Id (generate=GeneratorType.TABLE, generator="USERS_GEN")
public Integer getId_user() {
return id_user;
}

@Column (name = "last_change_timestamp", nullable = true, unique = false)
public Timestamp getLast_change_timestamp() {
return last_change_timestamp;
}

@Column (name = "login", nullable = false, length=50, unique = false)
public String getLogin() {
return login;
}

@Column (name = "passwd", nullable = true, length=128, unique = false)
public String getPasswd() {
return passwd;
}

....

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.