db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mark kummerer" <mkumme...@airtransportit.com>
Subject RE: Dose Torque enforce columns set to required = "true" ?
Date Tue, 11 Feb 2003 16:27:48 GMT
Thanks Rick,   I just want to make sure this is the expected results. I
looked threw the docs on columnMap and noticed the isNotNull() and
setNotNull() methods and thought they were used within inserts and
updates.  It looks like there not set in the MapBuild generated classes
anyway.  



-----Original Message-----
From: peter riegersperger [mailto:rick@subnet.at] 
Sent: Tuesday, February 11, 2003 10:52 AM
To: Turbine Torque Users List
Subject: Re: Dose Torque enforce columns set to required = "true" ?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 11 February 2003 16:48, mark kummerer wrote:
> Hello All:
>
>    I'm new to Torque and have an instance where the project-schema.xml

> file have columns set as required="true" and generated the base and 
> map classes. Upon inserting a new object where the column is null, an 
> sql exception is thrown.  I would expect the doInsert to check for not

> null and throw an exception before the sql is generated.  Is this the 
> expected results?  Is the required attribute only used for table 
> generation?

as far as my observations go, null values are not checked before trying
to 
insert them into the db. in my opinion, this is the right place for the
check 
(the database server is responsible for database consistency, not your 
application)

rick


- -- 
|-
| peter riegersperger  <rick@subnet.at>
|-
| ein windows switcher tagebuch:  
|http://forum.subnet.at/viewforum.php?f=22
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+SRwQIMP39JYOy9IRAgNhAJ4s9hOOVdX5of4INxMlrordHSUSfwCeND0q
xB5zLF+PcCxVdji9jlszMOU=
=Q+DU
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org



Mime
View raw message