[Grok-dev] Interaction between schema fields and properties

Luciano Ramalho luciano at ramalho.org
Wed Jul 4 19:47:43 EDT 2007

The Kirbi Book class has a field for the ISBN. I'd like to accept user
input in either ISBN-10 or ISBN-13 format, but always store it
internally as an ISBN-13.

My Book class uses the Grok fields inner class idiom. I tried to
create a property with the same name as the ISBN field, so that a
setter method would be invoked to do the ISBN-10 to ISBN-13
conversion, but the setter method is not being invoked (I suppose the
fields declaration overwrote my property).

How can I define a custom setter for a field using the fields inner
class approach?



More information about the Grok-dev mailing list