0

I have been working on spring and hibernate also python django for 7 months now. I did like spring and hibernate for designing api. But i wonder is there any framework in java which allows the developer to create models just my writing a POJO class without explicitly coding sql before.

Like what django has just create a table and run a syncdb command on manage.py file it syncs the model files to database tables.

1 Answer 1

1

If I understand well your question. You want to make some Java to SQL mapping which basicly do JPA(Hibernate)

Hibernate is ORM tool "Object-relational mapping"

Just check @Entity and you will find what you need eg. HERE.

Sign up to request clarification or add additional context in comments.

4 Comments

Yes, JPA is a right option for where we don't want to code SQL queries explicitly and POJO classes solves our purpose. Even if you add properties into POJO class it will automatically add column into table structure into database.
Actually i want to create tables without writing sql. just like django.
right @sathyaNarrayanan you just have to add hibernate configuration with DB details into you projects and need to model POJO classes that's it. If you don't find help then let me know i will share links for more reference.
do enabling this auto create tables and make changes in tables<property name="hibernate.hbm2ddl.auto">create</property>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.