This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to map an searh object to a class witth more fields with JPA annotations

 
Moli molina
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi at all,

I'm a neewie with JPA.

I need to map a search object to a table.
The search object has only and id, name. The big object has more fileds id, name, adress and more.

I use this as big object

What annotations a I need to use to map the search object to the table users?


Help is appreciated!
Thanks!


 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just use the same thing,

@Entity
@Table(name="users")
public class UserSearch {
 
Moli molina
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many thanks!

It works!

I'm a completely neewie!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic