Hibernate Not Creating table from Entity – Java Issue

create tables hibernate

Hibernate not creating table issue

All was fine until one table was not creating on the final destination of postgres database.

There was a lot of tables I was expecting to be created and only one was not making it.

How to debug the issue

The first thing you want to do is to see the all SQLs that are being created by Hibernate

spring.jpa.show-sql=true

You can put the above in the application.yml file and just keep an eye when the logs are rolling.

I see the create statement there

Yup, I was able to see the table being created in the logs. So why doesn’t it show up on postgres database??

The issue was one of the columns that I used was named as start, end, status..

I just changed those to other property names and the problem got resolved.

The other way you can do is to leverage the usage of Column annotation and provide the name right there. That way Hibernate will get better understanding of what is going on.

Hope it helps.

Get maximum occurring character

Flatten nested javascript array

Implement Queue Using two Stacks – JavaScript algorithm

Update Node and npm on mac OSX

Tunneling to AWS instance using pem file

Accessing Docker Postgres from host application

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*