Quantcast
Channel: Java Programming Forum - Learn Java Programming - Hibernate
Viewing all articles
Browse latest Browse all 76

a hibernate commit() question

$
0
0
if let's say i have a User user
and i have a Session sesh

and i do
Code:

sesh.save(user); 
sesh.commit(); 
sesh.commit();

the question is what will the second commit do ?
will it enter that same user twice with a diffrent id ?
or will it forget his data after the first commit has happend(and do nothing)?
thanks in advance to all helpers!

Viewing all articles
Browse latest Browse all 76

Trending Articles