I have been converting several EJB's to Postgres from HyperSonic. I have several
one-many relations using a fk column. I am using table create and for some of the
relations the column is being created as non-nullable, while it is not for other
relations. Most of these relations are allowed to be null. I do not see anything
different in the deployment descriptors between the different relations. Does anyone
have an idea as to what might cause this.
I have included excerpts for two of the relations in question:
The NetInterface-Subnet relation is generating a non-nullable column, while the
NetInterface-Node relation is not.
ejb-jar.xml:
<ejb-relation >
<ejb-relation-name>Subnet-Interface</ejb-relation-name>
<ejb-relationship-role >
<ejb-relationship-role-name>interface-belongs-to-subnet</ejb-relationship-role-name>
Many
<relationship-role-source >
<ejb-name>NetInterface</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>subnet</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role >
<ejb-relationship-role-name>subnet-has-interfaces</ejb-relationship-role-name>
One
<relationship-role-source >
<ejb-name>Subnet</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>netInterfaces</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation >
<ejb-relation-name>Node-Interface</ejb-relation-name>
<ejb-relationship-role >
<ejb-relationship-role-name>interface-belongs-to-node</ejb-relationship-role-name>
Many
<relationship-role-source >
<ejb-name>NetInterface</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>node</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role >
<ejb-relationship-role-name>node-has-interfaces</ejb-relationship-role-name>
One
<relationship-role-source >
<ejb-name>Node</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>netInterfaces</cmr-field-name>
<cmr-field-type>java.util.Collection</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
</ejb-relation>
jbosscmp-jdbc.xml
<ejb-relation>
<ejb-relation-name>Subnet-Interface</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>interface-belongs-to-subnet</ejb-relationship-role-name>
<key-fields/>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>subnet-has-interfaces</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>subnetId</field-name>
<column-name>SUBNETID</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
</ejb-relation>
<ejb-relation>
<ejb-relation-name>Node-Interface</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>interface-belongs-to-node</ejb-relationship-role-name>
<key-fields/>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>node-has-interfaces</ejb-relationship-role-name>
<key-fields>
<key-field>
<field-name>nodeId</field-name>
<column-name>NODEID</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
</ejb-relation>
Thanks in advance,
Mark
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835835#3835835
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835835
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development