-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: JPA Repository Exception
PostPosted: Sat May 21, 2016 5:00 am 
Newbie

Joined: Sat May 21, 2016 4:56 am
Posts: 5
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.

Top
 Profile  
 
 Post subject: Re: JPA Repository Exception
PostPosted: Sun May 22, 2016 7:04 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
It's difficult to answer your question without seeing the actual entity mapping and data access code.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.