Thanks Kengkaj,
But from what I read it seems that nullValue is used to substitute
value with a database NULL.
The thing is that I'm not allowed to use null since field is NOT NULL.
On Wed, Mar 18, 2009 at 6:00 AM, Kengkaj Sathianpantarit
kengka...@gmail.com wrote:
Use null value replacement
However, I think that default value is good in the case that we don't need
to specify value in INSERT command.
Why don't you just exclude this field in the insert?
For update, I think that we should specify value explicitly in the model,
error from database is correct behavior in case the field
Hi,
We are in the design phase of a project for a highly-reputed client.
We are focusing that the project to be a java based standard. Hence we
are using the JPA.
Since JPA does not provide clear idea of caching mechanism and about
the clustering environment, we thought of
Thanks Nicholoz,
This is what I've done. And I also have a facade that will abstract
for the user, the insert actions.
I thought that ibatis knows how to handle this, or have a trick for it.
On Wed, Mar 18, 2009 at 10:51 AM, Nicholoz Koka Kiknadze
kikna...@gmail.com wrote:
Why don't you just
What I ususally do:
public String getStatus() {
return null == status ? Some Default Value : status;
}
Alin Popa wrote:
Thanks Nicholoz,
This is what I've done. And I also have a facade that will abstract
for the user, the insert actions.
I thought that ibatis knows how to handle this, or
I think it would be better to put initialize code in constructor, putting
checking code in getter will make unnecessary checking every time the getter
is called.
Kengkaj
On Wed, Mar 18, 2009 at 8:00 PM, Alex Sherwin
alex.sher...@acadiasoft.comwrote:
What I ususally do:
public String
I do not like idea of keeping defaults both in database and application.
If I have a not nullable database field with some default value, besides
setting default value in database I use 'before insert' table trigger that
checks if supplied value is NULL and sets it to the desired value.
Well, I