Re: WOLips Entity Modeler SQL Generation and WO 5.4
Re: WOLips Entity Modeler SQL Generation and WO 5.4
- Subject: Re: WOLips Entity Modeler SQL Generation and WO 5.4
- From: David Avendasora <email@hidden>
- Date: Wed, 8 Jul 2009 07:26:49 -0400
On Jul 8, 2009, at 3:21 AM, Johann Werner wrote:
Hi Dave,
this addition to _Entity.java seems very useful. Perhaps it should
be added to the standard templates? They would become more sort of
"use them and don't care" so perhaps file a jira.
Done. WOL-1035
the snippit of code from the attribute setter method:
#if ($attribute.javaClassName == "java.math.BigDecimal")
if (${attribute.name} != null) {
${attribute.name} = ${attribute.name}.setScale($
{attribute.scale}, RoundingMode.HALF_UP);
}
#ends
Here's what the code looks like based on the default templates since
they use "value" instead of the actual attribute name:
#if ($attribute.javaClassName == "java.math.BigDecimal")
if (value != null) {
value = value.setScale(${attribute.scale}, RoundingMode.HALF_UP);
}
#ends
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden