[Prev] Thread [Next]  |  [Prev] Date [Next]

[transfer-dev] Accessing underlying data structure. Robert Rawlins Fri Feb 03 10:19:30 2012

Hello Guys,

I have a property on an object which is type='numeric' - it stores the 
price of a product.

The problem I have at the moment is that the generated setter method has an 
argument of type 'numeric' too.

When dynamically populating the bean from a form ready to be validated I 
sometimes get an exception, as the argument passed into the setter might 
not be of numeric type. This prevents me from validating the object and 
giving the user a helpful message.

In the hibernate ORM I would use an 'any' or 'string' type for the setter, 
and be able to establish a separate datatype at a database level for the 
property, but unfortunately this isn't something supported by transfer.

I've been playing with the concept of decorating the setter method, so that 
it let's me set a value of any type into the object. However, I can't 
figure out how to actually access the underlying data structure to set the 
property, without at some point going through the generated setter, which 
limits the argument to numeric.

Can anyone offer any advice on this?

Thank you.


Before posting questions to the group please read:

Try out the new Transfer ORM Custom Google Search:

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at