i'm still giving it a try .. now trying to use the @Any annotation again. looks like this ..
@Any(metaColumn = @Column(name = "object_type"))
@AnyMetaDef(idType = "ComponentId", metaType = "string", metaValues = {
@MetaValue(targetEntity = Balance.class, value = "BI"),
@MetaValue(targetEntity = ThermalConverter.class, value = "TE") })
@JoinColumns( { @JoinColumn(name = "TE_TTUNIT"),
@JoinColumn(name = "te_ttunit_konf_nr") })
private TemperatureComponent temperatureComponent;
i'm not sure what to use as idType in the @AnyMetaDef because we have our own class
which is just annotated with @Id. hibernate always throws the exception
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [spring-dao.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property mapping has wrong number of columns: at.irm.iopt.model.domain.opt.components.ThermalConverter.temperatureComponent type: object
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property mapping has wrong number of columns: at.irm.iopt.model.domain.opt.components.ThermalConverter.temperatureComponent type: object
Caused by: org.hibernate.MappingException: property mapping has wrong number of columns: at.irm.iopt.model.domain.opt.components.ThermalConverter.temperatureComponent type: object
i found this
http://opensource.atlassian.com/project ... -patch.txt where he can use columns instead of column. would that be a solution for me?
@any ideas?