ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <lmead...@apache.org>
Subject Re: Inserting Default values if object member is null
Date Mon, 14 Nov 2005 18:25:39 GMT
No, and as a rule, we try to avoid coding to "maybe requirements" - if
you don't *need* it, don't write it.

 :-D

Larry


On 11/14/05, Jason Hall <JHall@cihi.ca> wrote:
> I know I can use a database default or initialize the java property but
> I just
> Wanted to know if it is also possible in the sqlmapconfig.xml file.
> They may be some
> requirements not to do it in java or the database itself.
>
> Is there a way?
>
>
> -----Original Message-----
> From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
> Of Larry Meadors
> Sent: Monday, November 14, 2005 1:20 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Inserting Default values if object member is null
>
> Uhm, use a database default?
>
> Larry
>
>
> On 11/14/05, Jason Hall <JHall@cihi.ca> wrote:
> >
> > Hi,
> >
> > I just want to know if an object member is set to null and the
> > database column is configured as not null, is there a way in the
> > sqlmapconfig.xml to set a default value say -1 in a parameter map.
> > I've used nullValue but this is not exactly what i want. I need a
> > default value like a database default.
> >
> > Thanks,
> >
> > JH.
> >
>

Mime
View raw message