0

At the moment we're using python with django. We're splitting our monolithic api into a bunch of micro-services. For the moment we will be using our current database built with Django, and then gradually splitting the micro-services up into their own databases.

I'm wanting to use the java configuration without having to use xml.

How would I go about wiring hibernate up to an existing db table? Are there any tutorials or is it as simple as creating the jpa models and adding a config to point them to existing tables?

James111
  • 15,378
  • 15
  • 78
  • 121

1 Answers1

1

is it as simple as creating the jpa models and adding a config to point them to existing tables

Just be sure to let hbm2ddl.auto configured to validate, see: Hibernate hbm2ddl.auto possible values and what they do?, guessing your db user has alter table grant.

Btw, you may want to use reverse engineering as well, check: Generate JPA 2 Entities from existing Database

Community
  • 1
  • 1
Leonardo Lana
  • 590
  • 1
  • 4
  • 13