On 11/14/05, Larry Meadors <[EMAIL PROTECTED]> wrote:
> Uhm, use a database default?
Maybe. Don't all databases error on setting a non-nullable, defaulted
column to null? (as opposed to not setting it at all).
: Inserting Default values if object member is null
Well the best bet now would be to initialize the java bean with a
default value, i.e. -1.
On Nov 14, 2005, at 12:56 PM, Jason Hall wrote:
> Okay,
>
> Just wanted to know, an afilliate of mine wanted to know.
>
> Thanks,
>
>
PROTECTED] On
Behalf
Of Larry Meadors
Sent: Monday, November 14, 2005 2:53 PM
To: user-java@ibatis.apache.org
Subject: Re: Inserting Default values if object member is null
On 11/14/05, Jason Hall <[EMAIL PROTECTED]> wrote:
maybe ibatis should support this.
I disagree.
IMO this is somethin
Okay,
Just wanted to know, an afilliate of mine wanted to know.
Thanks,
JH.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Larry Meadors
Sent: Monday, November 14, 2005 2:53 PM
To: user-java@ibatis.apache.org
Subject: Re: Inserting Default values if
On 11/14/05, Jason Hall <[EMAIL PROTECTED]> wrote:
>
> maybe ibatis should support this.
I disagree.
IMO this is something that should live inthe service/ business logic
layer (if it is an application rule), or in the database (if it is an
enterprise rule).
Putting it in iBATIS (an itegration po
maybe ibatis should support this.
From: Niels Beekman [mailto:[EMAIL PROTECTED]
Sent: Monday, November 14, 2005 2:34 PMTo:
user-java@ibatis.apache.orgSubject: RE: Inserting Default values if
object member is null
You are right, you
can’t, because there is no need, since the database
user-java@ibatis.apache.orgSubject: Re: Inserting
Default values if object member is null
BTW you could also do it inline
insert into A (col1,col2) values
(#col1:NUMERIC:-1#, #col2:VARCHAR:NO_ENTRY#
This can be found on page 20 of the developers guide
On Nov 14, 2005, at 12:09 PM, Jason
t: RE: Inserting Default
values if object member is null
You should use the DTD (http://ibatis.apache.org/dtd/sql-map-2.dtd).
The property is actually nullValue, in your example:
When iBATIS finds -999 in the
Dummy.id-property it will insert null into the database, when null is found in
the dat
BATIS will put -999 in the
Dummy.id-property.
From: Jason
Hall [mailto:[EMAIL PROTECTED] Sent: maandag 14 november 2005
20:26To: user-java@ibatis.apache.orgSubject: RE: Inserting Default values if
object member is null
I tried using null
property and i get and sqlmapconfig parsing
-property.
From: Jason Hall
[mailto:[EMAIL PROTECTED]
Sent: maandag 14 november 2005
20:26
To: user-java@ibatis.apache.org
Subject: RE: Inserting Default
values if object member is null
I tried using null property and i get and
sqlmapconfig parsing error - "null" not a vali
-java@ibatis.apache.orgSubject: Re: Inserting Default values if object member is null You can specify your insert sqlmap to use a ParameterMap and set the nullValue property on the specific column. Nathan On Nov 14, 2005, at 11:16 AM, Jason Hall wrote: Hi, I just want to know if an object m
Sent: Monday, November 14, 2005 2:05 PMTo: user-java@ibatis.apache.orgSubject:
Re: Inserting Default values if object member is null
You can specify your insert sqlmap to use a ParameterMap and set
the nullValue property on the specific column.
Nathan
On Nov 14, 2005, at 1
PMTo: user-java@ibatis.apache.orgSubject: Re: Inserting Default values if object member is null You can specify your insert sqlmap to use a ParameterMap and set the nullValue property on the specific column. Nathan On Nov 14, 2005, at 11:16 AM, Jason Hall wrote: Hi, I just want to know if an object member
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 2:05
PMTo: user-java@ibatis.apache.orgSubject: Re: Inserting
Default values if object member is null
You can specify your insert sqlmap to use a ParameterMap and set the
nullValue property on the specific column.
N
You can specify your insert sqlmap to use a ParameterMap and set the nullValue property on the specific column.NathanOn Nov 14, 2005, at 11:16 AM, Jason Hall 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 th
dors
> 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 <[EMAIL PROTECTED]> wrote:
> >
> >
] [mailto:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
&
Uhm, use a database default?
Larry
On 11/14/05, Jason Hall <[EMAIL PROTECTED]> 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 ma
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 da
19 matches
Mail list logo