Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Object Relational Mapping
Error: Entity <name> has no Id or EmbeddedId
Martin Frisone
Greenhorn
Posts: 7
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi, guys
I'm mapping a table Persons to a
java
class Persons:
@Entity @Table(name = "PERSONS") public class Persons implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "ID") private Integer id; @Basic(optional = false) @Column(name = "FIRST_NAME") private String firstName; @Column(name = "MIDDLE_NAME") private String middleName; @Basic(optional = false) @Column(name = "LAST_NAME") private String lastName; @Column(name = "ADDRESS") private String address;
and I'm getting the error: "Entity Persons has no Id or EmbeddedId". I don't understand why this happenes since I have the @Id annotation.
I appreciate any help on this. Thanks in advance!
Leandro Coutinho
Ranch Hand
Posts: 430
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi!
I don't know, but maybe:
- id != Id
- int and not Integer
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Why is my Hibernate Search query not working?
JPA - need help with query
How to Write Left Outer Join
mapping problem and joinColumns
JPA composite key mapping
More...