Oct 25th, 2012, 07:31 AM
ROO web mvc conversion error
I created an entity, "Tasa" with a BigDecimal field.
When I try to save a new "Tasa", with some decimal value like 12.30, the server says that "The request sent by the client was syntactically incorrect ()."
Looking at the log I found:
Failed to convert from type java.lang.String to type java.lang.Long for value '12.30';
How do I force spring to convert to BigDecimal instead of Long ?
Last edited by enorrmann; Oct 25th, 2012 at 07:32 AM.
Reason: spelling error
Oct 25th, 2012, 09:33 AM
Answer to myself:
If your entity has the same name as a field of that entity, it will FAIL
try next script
project --topLevelPackage test --projectName test --java 6 --packaging JAR
jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
entity jpa --class test.model.Cuota
field string --fieldName name
field number --fieldName cuota --type java.math.BigDecimal
field string --fieldName surname
web mvc setup
web mvc all --package test.web
Tags for this Thread