[hibernate-dev] Annotation name for column-level read/write expression
Emmanuel Bernard
emmanuel at hibernate.org
Mon Sep 27 18:10:57 EDT 2010
Hey guys,
I've implemented http://opensource.atlassian.com/projects/hibernate/browse/HHH-4510 and committed it. It basically looks like that
@Entity
class CreditCard {
@Column(name="credit_card_num")
@ReadWriteExpression(
forColumn="credit_card_num",
read="decrypt(credit_card_num)",
write="encrypt(?)")
public String getCreditCardNumber() { return creditCardNumber; }
public void setCreditCardNumber(String number) { this.creditCardNumber = number; }
private String creditCardNumber;
}
However, I am not super happy about @ReadWriteExpression as a name. @ColumnReadWriteExpression is the most correct name but quite mouthful.
Anybody gets a better idea?
Emmanuel
More information about the hibernate-dev
mailing list