Hi,
I have a POJO BookLent with several properties.
2 of them are bookId and isCurrent.
/**
* @return Long
* @hibernate.property column="book_id" type="long"
* not-null="true" unique="false"
*/
public Long getBookId() {
return bookId;
}
/**
* @return boolean
* @hibernate.property
* column="current" type="boolean"
*/
public boolean getIsCurrent() {
return isCurrent;
}
Every one for itself is not unique but there should be always
0 or 1 records in the db with the same book_id and current=true.
How can I manage this using XDoclet ?
TIA,
Siegbert
|