Reputation: 29
If we save an object with jpa like: session.persist(student);
Does this save as prepared statements? Also, does this avoid the sql injection?
Upvotes: 0
Views: 82
Reputation: 31
strudent there is an entity, represent one row(with its relation to other table if any), and will generated prepared statement that will avoid sql injection because its wrapped.
Upvotes: 1
Reputation: 29907
Yes, Hibernate will create a prepared statement (and thus prevent SQL injection).
Upvotes: 0