Hibernate version: 3.3.1
Mapping documents: via annotations
Hi,
I am new to Hibernate and am working on switching from xdoclet to annotations. Most of the stuff already works, but I´ve got a problem with a joined subclass.
The table "xr_batch_data" contains the XR specific part of a batch. It is mapped via the column batchID to the table "batch".
The class for "xr_batch_data":
Code:
/**
* @hibernate.joined-subclass
* table="xr_batch_data"
*
* @hibernate.joined-subclass-key
* column="batchID"
*/
@Entity
@Table(name=TableName.XR_BATCH_DATA)
@Inheritance(strategy=InheritanceType.JOINED)
@PrimaryKeyJoinColumn(name=FieldName.XRBATCH_ID)
public class XRBatchBean extends BatchBean {
The class for "batch":
Code:
@Entity
@Table(name=TableName.BATCH)
@Inheritance(strategy=InheritanceType.JOINED)
public abstract class BatchBean extends PersistenceBean {
PersistenceBean is an abstract class. I checked all my constants and these are ok.
Now, when I try to get data in my client I get this exception:
Code:
java.lang.IllegalArgumentException: Parameter startdate does not exist as a named parameter in [select batch from de.xxx.yyy.client.bean.XRBatchBean as batch where batch.created>= :startdate and batch.stopped<= :enddate]
I checked it and the parameter is still there. Nothing changed in that part of the code. I assume the reason is this warning that occurs before:
Code:
>>> WARN [QuerySplitter.concreteQueries]: no persistent classes found for query class: select batch from de.xxx.yyy.client.bean.XRBatchBean as batch where batch.created>= :startdate and batch.stopped<= :enddate
I have checked the documentation, googled, and searched this forum but couldn´t find anything useful.
I hope you can help me.
Lars