Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 5641 invoked from network); 11 Feb 2003 16:20:15 -0000 Received: from unknown (HELO dst-usa.com) (63.68.19.12) by daedalus.apache.org with SMTP; 11 Feb 2003 16:20:15 -0000 Received: from D36ND411 [10.10.2.21] by dst-usa.com with ESMTP (SMTPD32-7.13) id A26665A601CC; Tue, 11 Feb 2003 11:18:46 -0500 Reply-To: From: "mark kummerer" To: "'Turbine Torque Users List'" Subject: RE: Dose Torque enforce columns set to required = "true" ? Date: Tue, 11 Feb 2003 11:27:48 -0500 Message-ID: <001401c2d1ea$83c0fa90$090a0a0a@D36ND411> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <200302111651.44716.rick@subnet.at> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 |- | 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