Created
January 24, 2012 21:01
-
-
Save ctataryn/1672625 to your computer and use it in GitHub Desktop.
JPA Interface problem...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity(name = "Player") | |
public class PlayerImpl implements Player { | |
@Id | |
@Column(name = "PlayerId") | |
private Integer id = -1; | |
@Embedded | |
private PersonName name; //to get this to work, I have to re-type this as PersonNameImpl and cast in the setter | |
public PersonName getName() { | |
return name; | |
} | |
public void setName(PersonName name) { | |
this.name = name; | |
} | |
. | |
. | |
. | |
} | |
@Embeddable | |
public class PersonNameImpl implements PersonName { | |
@Column(name="FirstName") | |
private String firstName; | |
@Column(name="LastName") | |
private String lastName; | |
. | |
. | |
. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment