Reputation: 2917
Background: I am working on a web application, which uses oracle jdbc and access database with java code and also sql queries which will be executed by our engine.
Now I am thinking about "replacing" jdbc over the time with hibernate t have -let's say - hibernate advantages.
My question is, can this be done step by step?
Can I start to create new tables with hibernate and work with hibernate without having risk with the existing database structure? can hibernate works in parallel with jdbc?
Upvotes: 1
Views: 701
Reputation: 727
Yes, JDBC and hibernate both can be used in parallel.
However, it depends on use cases. As per your question you just want to "replace" JDBC with Hibernate.
So, yes in this case you can start with :
Upvotes: 1
Reputation: 286
The answer is positive.
You can have both jdbc and hibernate data-sources in the same project, no problem.
Just be careful not to mix up those two data-sources, that's all.
Upvotes: 3