Hi,
I am a beginner with Jboss and I am trying to crete a CMP entity bean with
JBoss-4.0.2. The requirement is that only the primary key field is not null and
the others could be null.
The problem is whenever i declare any integer fields, jboss creates them as
not-null fields. When i call the create method on the entity bean it throws an
error. Because some of the fields are not null fields(fields other than the
pk). Is there anyway I can override this??? Thanks for all ur help.
My jbosscmp-jdbc.xml looks like this
<jbosscmp-jdbc>
<enterprise-beans>
<ejb-name>cabinEJB</ejb-name>
<table-name>cabin</table-name>
<cmp-field>
<field-name>shipId</field-name>
<column-name>shipId</column-name>
</cmp-field>
<cmp-field>
<field-name>bedCount</field-name>
<column-name>bedCount</column-name>
</cmp-field>
<cmp-field>
<field-name>deckLevel</field-name>
<column-name>deckLevel</column-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
<column-name>name</column-name>
</cmp-field>
<cmp-field><!--PRIMARY KEY-->
<field-name>id</field-name>
<column-name>id</column-name>
<not-null/>
</cmp-field>
</enterprise-beans>
</jbosscmp-jdbc>
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3885268#3885268
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3885268
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user