-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Filling ID with trigger.
PostPosted: Wed Jan 26, 2011 2:24 pm 
Newbie

Joined: Wed Jan 26, 2011 2:20 pm
Posts: 1
Hello,

I am having some issues when trying to let a trigger fill ID. Hibernate does not allow me to set id "nullable = true" (id does nothing), and there is no way to let Hibernate know that i will treat it at DB, so it can be NULL on ID.

How can I do that? Can anyone help me?
Code:
@Entity
@Table(name = "TABLE_NAME")
public class ClassName extends BasicBusinessObject implements Serializable {
    @Id
    @Column(name = "ID", nullable = true)
    private Long id;
...
...


Thanks in advance.

Edit: I am coming from MySQL and going to Oracle. I would like it to work with BOTH (changing only the connection and dialect parameters), that's why the 'null id' is necessary.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.