Hi,

I am not sure whether the following works, but I would suggest that you use an 
EmbedddId for your primary key. This way, you have to create an Embeddable 
class, and you have to duplicate the timestamp ID property to the embeddable 
class.

The only problem with this approach is that this would duplicate the field in 
insert/update statements.
So you have to annotate the timestamp property in the embeddable class this way:
@Embeddable
  | public class MyId implements Serializable
  | {
  |   @Column(name="...", insertable=false, updateable=false)
  |   public TimeStamp getSomething()
  |   {
  |     ...
  |   }
  |   @Column(...)
  |   public Integer getOtherIdFields()
  |   {
  |     ...
  |   }
  | }

Hope this works and helps ;-)

Wolfgang

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4238146#4238146

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4238146
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to