db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter riegersperger <r...@subnet.at>
Subject Re: Dose Torque enforce columns set to required = "true" ?
Date Tue, 11 Feb 2003 15:51:40 GMT
-----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-----


Mime
View raw message