fabio valsecchi [
https://community.jboss.org/people/fabiovalse] created the discussion
"How to get the id of entity with auto_increment value?"
To view the discussion, visit:
https://community.jboss.org/message/796928#796928
--------------------------------------------------------------
Hi there,
I've an entity Order with @GeneratedValue(strategy = GenerationType.IDENTITY)
annotation. I've a MySql database
----------------------------------------------------------------------------------------------------------------
@Entity
@Table(name = "orders")
public class Order implements Serializable {
private static final long serialVersionUID = 3L;
public Order() {
super();
}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private int id;
.....
----------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/796928#796928]
Start a new discussion in EJB3 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]