What about a simple uppper/lower write? On Tue, 2010-09-28 at 09:58 +0200, Emmanuel Bernard wrote: > I've tried @ReadExpression / @WriteExpression but I was not happy about it > because of the forColumn duplication. That made the construct a lot more > verbose. > And all the examples I've found need both. > > On 28 sept. 2010, at 00:16, Paul Benedict wrote: > > > I am not happy about @ReadWriteExpression either. Why not just > > @ReadExpression and @WriteExpression? I don't even think you need the > > forColumn attribute -- it could be derived out of the metadata. > > > > On Mon, Sep 27, 2010 at 5:10 PM, Emmanuel Bernard > > <emman...@hibernate.org> wrote: > >> 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 > >> > >> _______________________________________________ > >> hibernate-dev mailing list > >> hibernate-dev@lists.jboss.org > >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > >> > > > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev
-- Steve Ebersole <st...@hibernate.org> http://hibernate.org _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev