]
Maillefer Jean-David commented on HCANN-8:
------------------------------------------
Section section "2.1.6 Mapping Defaults for Non-Relationship Fields or
Properties" of the spec too.
Hibernate allow to embed non embeddable class
---------------------------------------------
Key: HCANN-8
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HCANN-8
Project: Hibernate Commons Annotations
Issue Type: Bug
Environment: JBoss-5.1.0.GA, postgresql 8.4.0
Reporter: Maillefer Jean-David
Priority: Minor
Hibernate allows to embed (successfully !) a non embeddable class (if it was
embeddable, it would throw a compiler exception)
@Entity
public class BanqueId {
@Id
int id;
}
public class Compte{
@ManyToOne
@JoinColumn(name = "compte_banqueId_id", insertable = false, updatable =
false)
private BanqueId banqueId;
@Column(name = "compte_iban", length = 30)
private String iban;
}
@Entity
public class Cotisation {
@Id
int id;
@Embedded
private Compte compte;
}
In this case, using @Embeddable on Compte yields the following compiler error:
"Attribute "banqueId" has invalid mapping type in this context"
Not using this annotation (as in this example) generates (at least partially) working
code, but seems not to follow the specification (ejb 3.0 spec persistance, 9.1.35) !
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: