Hi,
I am new to JPA. I am using postgre and Java.
I have created one table say eg user which has fields firstname(string), lastname(string) and user_type(enum_user_type). I have also define the enum. so my table has two string columns(basic datatype) and one user defined datatype( as enum_user_type) column.
Now I need to create the Entity from DB tables, so I have created JPA Project( From JPA Tools) I have created the entity. Inside it, for my userdefined datatype it is referring Object. I have also created userRepository, there I am getting error as Caused by: org.hibernate.MappingException: property mapping has wrong number of columns: userType type: object.
How to resolve this, please suggest.
Modifying the question as below I am new to JPA. Can someone please provide a good example or tutorial on how to use the following - 1. how to use Spring data JPA 2. how to use JPARepository 3. how to create entity from database tables 4. how to save(save method of JPARepository) data(table fields) in database table 5. how to check or save data through postman chrome. 5. how to display the save data (in postman) from database.
I searched a lot but did not find a good tutorial. Please suggest a Detail good tutorial (all steps having mock table and its fields) for above problems.
Thanks.
Last edited by TejD on Mon May 23, 2016 10:31 am, edited 1 time in total.
|