Created
January 19, 2011 14:34
-
-
Save emmanuelbernard/786238 to your computer and use it in GitHub Desktop.
This file contains 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 | |
public class A { | |
@Id @GeneratedValue(strategy=SEQUENCE) | |
public Integer getId() { return id; } | |
public void setId(Integer id) { this.id = id; } | |
private Integer id; | |
public String getName() { return name; } | |
private void setName(String name) { this.name = name; } | |
private String name; | |
} | |
Serializable id = em.unwrap(Session.class).save(a); | |
a.setName("Why oh why redundancy? " + id); | |
em.flush(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment