stoyan zhekov commented on Bug HBX-1126

hi everyone,
it seems that I have similar problem or at less I have the same exception. I use hibernate 3.6.6, jboss 6.1 and informix10. Infact everything worked fine before migration, when jboss 5 was used. Also I want to mention I dont have parameter DELIMIDENT in my url. My problem comes on the class which has two embedded field (for clarity : the names are as follow, sender and cerrier) with the same reference type. Both of the field use @AttributeOverride and @AssociationOverride to override properly names of the columns and association of the class which is annotated with @embeddable. The last one also have @OneToOne relationship with other entity. I try to check which on of the field make the problem so everything begins to work fine if I delete "sender" field. Here is a part of the code:

@Embeddable
public class ProductsAgent{ @Column(name = "name") private String name; @Column(name = "statute") private String statute; @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name = "products_agent_address_id") private Address address; }

@Entity
class Registration76v{

@Embedded
@AssociationOverride(name = "address", joinColumns = @JoinColumn(name = "sender_address_id", table = "registration76v"))
@AttributeOverrides(value = { @AttributeOverride(name = "name", column = @Column(name = "sender_name", table = "registration76v")), @AttributeOverride(name = "statute", column = @Column(name = "sender_statute", table = "registration76v")) })
private ProductsAgent1 sender = new ProductsAgent1();

@Embedded
@AssociationOverride(name = "address", joinColumns = @JoinColumn(name = "carrier_address_id", table = "registration76v"))
@AttributeOverrides(value = { @AttributeOverride(name = "name", column = @Column(name = "carrier_name", table = "registration76v")), @AttributeOverride(name = "statute", column = @Column(name = "carrier_statute", table = "registration76v")) })
private ProductsAgent carrier = new ProductsAgent();

}

here is a part of the log:

16:20:38,212 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: -79738, SQLState: IX000
16:20:38,212 ERROR [org.hibernate.util.JDBCExceptionReporter] org.hibernate.util.JDBCExceptionReporter] No such column name
16:20:38,215 INFO [org.hibernate.event.def.DefaultLoadEventListener] Error performing load command: org.hibernate.exception.GenericJDBCException: could not load an entity:
16:20:38,215 INFO [org.hibernate.event.def.DefaultLoadEventListener] Error performing load command: org.hibernate.exception.GenericJDBCException: could not load an entity:

Somehow my colleague find that the problem comes from wrong generated sql. And to be more specif with generated alias of "sender_address_id".

So, if someone can give me a advice how to solve this problem I really will appreciate that.
Thanks in advance.

P.S
It is my first time when I try to solve the problem in this way, so excuse me if I didnt describe everything very well

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira