-->
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.  [ 2 posts ] 
Author Message
 Post subject: Null values translates in empty string in SQL Expression
PostPosted: Mon Sep 22, 2008 6:03 am 
Newbie

Joined: Mon Sep 22, 2008 5:51 am
Posts: 2
HI!

When i save object,
null values translates in empty string ('<null>') in SQL expressin.

For example:

my Entity:
int id = 10
String name = "abc"
Integer code = null

Translate in to:
INSERT INTO tale(id,name,code) VALUES(10,'abc','')

How can i suppress that and get below expression if value is null:
INSERT INTO tale(id,name) VALUES(10,'abc')


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 22, 2008 6:09 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
set calss property dynamic-insert="true"

This will do dirty check for your class properties autmatically


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

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.