aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate\JPA set field Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate\JPA set field" Watch "Hibernate\JPA set field" New topic
Author

Hibernate\JPA set field

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 203
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

Joined: Mar 07, 2010
Posts: 1632
    
    7

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.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate\JPA set field
 
Similar Threads
Topic is not saved in correct encoding when I post in Tradit
constant error problem
how to see the posts page after u login
About topic_last_post_id
Bug fix for deleting posts