i'm trying to override a unique constraint on a column on a subclass, but it
doesn't seem to work
parent class:
| @MappedSuperclass
| public class BaseEntity {
|
| private Integer code;
|
| @Column(length=6,unique=true)
| public Integer getCode() {
| return code;
| }
| public void setCode(Integer code) {
| this.code = code;
| }
|
| }
|
child class (with one class between them in de hierarchy)
| @Entity
| @Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
| @AttributeOverride(name="code",[EMAIL PROTECTED](unique=false))
| public abstract class InternDocument extends Document{
| }
|
I can't persist two instances of a subclass of InternDocument with the same
value for the code property...
Anyone knows what my problem could be ?
i looked around for a solution and stumbled on this JIRA issue:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-240
which mentions exactly the same problem (can't override attributes on non-leave
classes in the hierarchy) but it was solved in Hibernate Annotations in
February, could it be that the error still exists in my config which is JBoss
4.0.3SP1 + EJB 3.0 RC4 PFD ?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944543#3944543
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944543
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user