File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate\JPA set field

 
Niall Loughnane
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a field "topicId" that i set the id of the topic,

i use a filter to set the current topic id when doing queries,

but is there anything to set the topicId when doing inserts and updates?

Thanks,

Niall
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand why you would need to set the id on an insert or update. Would these not be generated? Also you typically do not write insert or update queries you just modify the entity and when the transaction is committed hibernate will generate the appropriate update or insert query.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic