Hello Ove, have you tried just <not-null/>? Here is the code that sets the value for not-null property: // not-null Element notNullElement = MetaData.getOptionalChild(element, "not-null"); notNull = fieldType.isPrimitive() || primaryKeyMember || (notNullElement != null);
<not-null/> should work and the dtd is correct! alex Wednesday, August 21, 2002, 1:14:56 PM, you wrote: OR> FYI: OR> This is a cross-post from the XDoclet user list. OR> Is this a bug or am I wrong!? OR> Ove Ranheim OR> [EMAIL PROTECTED] OR> -----Original Message----- OR> From: Ove Ranheim OR> Sent: 21. august 2002 10:44 OR> To: [EMAIL PROTECTED] OR> Subject: RE: [Xdoclet-user] CMP field NOT NULL OR> This is not for ejb-jar.xml, but for the jboss specific dd; OR> jbosscmp-jdbc.xml. The objective is to tell jboss which fields are OR> nullable or not. OR> I've found the error prone, and to be clear on the issue; OR> 1. if you do NOT use an DTD with for the jbosscmp-jdbc dd you can write OR> <cmp-field> OR> <field-name>uidSection</field-name> OR> <column-name>uidSection</column-name> OR> <jdbc-type>CHAR</jdbc-type> OR> <sql-type>CHAR(64)</sql-type> OR> <not-null>true</not-null> OR> </cmp-field> OR> and this will cause the construct of a field that cannot be null. OR> 2. if you DO use an DTD it will raise an exception in JBoss 3.0.1. OR> Reason is, the DTD and the jboss validator needs a fix in it's DTD at OR> line 206 from; OR> <!-- OR> The cmp-field element contains the configuration of a cmp-field. -->> OR> <!ELEMENT cmp-field (field-name, read-only?, read-time-out?, OR> column-name?, not-null?, ((jdbc-type, sql-type) | (property+))? )>> OR> <!-- OR> If present the field will not allow a field value. -->> OR> <!ELEMENT not-null EMPTY> OR> to OR> <!ELEMENT not-null (#PCDATA)> OR> Hope this clearifies the problem. OR> Ove OR> -----Original Message----- OR> From: Andrew Stevens [mailto:[EMAIL PROTECTED]] OR> Sent: 21. august 2002 01:22 OR> To: [EMAIL PROTECTED] OR> Subject: Re: [Xdoclet-user] CMP field NOT NULL OR> A wise old hermit known only as Ove Ranheim <[EMAIL PROTECTED]> once said: >> How do I set a CMP field to be NOT NULL? OR> No idea. What does the EJB spec say to put in the deployment OR> descriptor? OR> Andrew. -- Best regards, Alex Loubyansky ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user