Hi, I tried following thing:
@MappedSuperclass
| @IdClass(FootballerPk.class)
| public class Footballer {
| String firstname;
| String lastname;
| //part of the id key
| @Id public String getFirstname() {
| return firstname;
| }
|
| public void setFirstname(String firstname) {
| this.firstname = firstname;
| }
|
| //part of the id key
| @Id public String getLastname() {
| return lastname;
| }
|
| public void setLastname(String lastname) {
| this.lastname = lastname;
| }
|
| public String getClub() {
| return club;
| }
|
| public void setClub(String club) {
| this.club = club;
| }
|
| //appropriate equals() and hashCode() implementation
| }
|
| @Embeddable
| public class FootballerPk implements Serializable {
| String firstname;
| String lastname;
| //same name and type as in Footballer
| public String getFirstname() {
| return firstname;
| }
|
| public void setFirstname(String firstname) {
| this.firstname = firstname;
| }
|
| //same name and type as in Footballer
| public String getLastname() {
| return lastname;
| }
|
| public void setLastname(String lastname) {
| this.lastname = lastname;
| }
|
| //appropriate equals() and hashCode() implementation
| }
@Entity
| @AttributeOverride( name="firstname", column =
@Column(name="new_firstname") )
| public class ExtendedFootballer extends Footballer{
| ...
| }
But I dont get it to work, that the Attrribute is overwritten.
All works fine if I dont use @IdClass.
Is this a possible Bug?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928394#3928394
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928394
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user