Is it possible to create sequence even if it is not used in @GeneratedValue? I use this sequence later to fill part of composite id in my DAO. Would be good if I could describe as much as possible of database related with bean.
Hm...Triggers creation also would be good to have. ;-)
For example:
Code:
@Entity
@SequenceGenerator(name = "SEQ_MEASURING", sequenceName = "SEQ_MEASURING")
public class Measuring extends AbstractDatabaseBean {
////////////////////////////////////////////////////////////////////////////
//
// Constructor
//
////////////////////////////////////////////////////////////////////////////
public Measuring() {
}
////////////////////////////////////////////////////////////////////////////
//
// Id
//
////////////////////////////////////////////////////////////////////////////
private MeasuringId m_id;
@EmbeddedId
public MeasuringId getId() {
return m_id;
}
public void setId(MeasuringId id) {
m_id = id;
}
[cut]
}