Hi,
I have the following entity beans:
person(id(integer), name(varchar))
job(id(integer), name(varchar))
So, this is my ejb-jar.xml:
<enterprise-beans>
<entity>
<description> Person
EJB CMP
</description>
<cmp-version>2.0</cmp-version>
<ejb-name>Person</ejb-name>
<home>person.PersonHome</home>
<remote>person.Person</remote>
<ejb-class>person.PersonBean</ejb-class>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>jobid</field-name></cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
<enterprise-beans>
<entity>
<description> Person
EJB CMP
</description>
<cmp-version>2.0</cmp-version>
<ejb-name>Job</ejb-name>
<home>JobHome</home>
<remote>Job</remote>
<ejb-class>JobBean</ejb-class>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<persistence-type>Container</persistence-type>
<cmp-field><field-name>id</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<primkey-field>id</primkey-field>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>Person-Job</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name></ejb-relationship-role-name>
<multiplicity>one</multiplicity>
<role-source>
<ejb-name>Job</ejb-name>
<remote-ejb-name>Job</remote-ejb-name>
<dependent-name>Job</dependent-name>
</role-source>
<cmr-field>
<cmr-field-name>jobid</cmr-field-name>
<cmr-field-type>Job</cmr-field-type>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name></ejb-relationship-role-name>
<multiplicity>one</multiplicity>
<role-source>
<ejb-name>Person</ejb-name>
<remote-ejb-name>Person</remote-ejb-name>
<dependent-name>Person</dependent-name>
</role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>
Everything seems
to work fine, I mean, the entities get deployed etc... but when I try to
create a new
Person Orion seems to map the Integer field to
SQLBIG_INT so I get the following error:
[ODBC SQL SERVER DRIVER] Optional feature not
implemented
In the squema for the sql-server I have the
following mapping:
<type-mapping
type="java.lang.Integer" name="int" />
but anyway it still replace the Integer by
SQLBIG_INT
Does anybody know what I'm doing
wrong?
Thanks in advance.