[jboss-user] [EJB 3.0] - Overriding the generated value inherited from a mapped super
d-rock
do-not-reply at jboss.com
Wed Jul 26 11:10:57 EDT 2006
If I have a class:
| @Entity
| @MappedSuperclass
| @SequenceGenerator(name = "log_id_seq", sequenceName = "log_id_seq")
| public class LogEntry implements Serializable {
| private static final long serialVersionUID = 1L;
|
| protected Long id;
| protected Date timestamp;
| protected Actor actor;
| protected String location;
| protected String summary;
|
| @Id
| @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "log_id_seq")
| public Long getId() {
| return id;
| }
|
| // The rest of the getters/setters...
| }
|
Can I override the generated value generator in subclasses somehow? I'd like to have a separate sequence for each subclass if possible.
Thanks,
Derek
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961033#3961033
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961033
More information about the jboss-user
mailing list