Having trouble getting
JBoss to know which fields are part of my entity, when using a compound key.
My table has 3 Strings as the PK. No other columns. I created a PK class, and map to it in the ejbjar.xml
...
<prim-key-class>com.titan.rick.Report_tPK</prim-key-class>
...
<cmp-field><field-name>reportType</field-name></cmp-field>
<cmp-field><field-name>month</field-name></cmp-field>
<cmp-field><field-name>year</field-name></cmp-field>
...
And as far as I can tell, coded the Interfaces and the abstract Bean class OK.
Upon deployment, JBoss logs that it successfully created and deleted an entity:
JDBCCreateEntityCommand.Report_tEJB] Insert Entity SQL: INSERT INTO Report_t (ReportType, Month, Year) VALUES (?, ?, ?)
JDBCCreateEntityCommand.Report_tEJB] Entity Exists SQL: SELECT COUNT(*) FROM Report_t WHERE
JDBCCommandFactory.Report_tEJB] entity-command: [commandName=default,commandClass=class org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand,attributes={}]
JDBCRemoveEntityCommand.Report_tEJB] Remove SQL: DELETE FROM Report_t WHERE
-->> Nothing follows the WHERE clause.
And likewise, when my client attempts to do a findByPrimaryKey(), the similar problem is generated:
Executing SQL: SELECT FROM Report_t WHERE
jdbc.JDBCFindByPrimaryKeyQuery.Report_tEJB.findByPrimaryKey] Find failed
No fields in the SELECT and no fields/values in the WHERE.
Any suggestions?
Thanks in advance.