hello guys
i am in hell with this
i work with xdoclet and pls see this situtation
[CODE]
/**
* @hibernate.property column="precioUnitarioVenta" [b]length="6"[/b]
not-null="true"
*/
public [b]BigDecimal[/b] getPrecioUnitarioVenta() {
return precioUnitarioVenta;
}
[/CODE]
if i go to my mapping file i see this
[CODE]
<property
name="precioUnitarioVenta"
type="java.math.BigDecimal"
update="true"
insert="true"
column="precioUnitarioVenta"
[b] length="6" [/b]
not-null="true"
/>
[/CODE]
it seems fine,
but if i see the type of each column of the table in the db
i see this
[B] decimal(19,2)[/B]
here
[url]http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-declaration-property[/url]
i can see this
[CODE]
<property
name="propertyName" (1)
column="column_name" (2)
type="typename" (3)
update="true|false" (4)
insert="true|false" (4)
formula="arbitrary SQL expression" (5)
access="field|property|ClassName" (6)
lazy="true|false" (7)
unique="true|false" (8)
not-null="true|false" (9)
optimistic-lock="true|false" (10)
generated="never|insert|always" (11)
node="element-name|@attribute-name|element/@attribute|."
index="index_name"
unique_key="unique_key_id"
length="L"
[b] precision="P"
scale="S" [/b]
/>
[/CODE]
bold part sadly are not supported by xdoclet 1
and if in my java code i write anyway this
[CODE]
/**
* @hibernate.property not-null="true"
* [b]precision="9"
* scale="2" [/b]
* column="precioUnitario"
*
*/
public BigDecimal getPrecioUnitario() {
return precioUnitario;
}
public void setPrecioUnitario(BigDecimal precioUnitario) {
this.precioUnitario = precioUnitario;
}
[/CODE]
with the ant task i dont recieve any error but , in the mapping file appear
[CODE]
<property
name="precioUnitario"
type="java.math.BigDecimal"
update="true"
insert="true"
column="precioUnitario"
not-null="true"
/>
[/CODE]
of course length value was not written with xdoclet but the desired
properties not appear
[b]precision,scale[/b]
exists a way with ant after to create the mapping files (hbm.xml)
replace
[CODE]
<property
name="precioUnitario"
[b]type="java.math.BigDecimal"[/b]
update="true"
insert="true"
column="precioUnitario"
not-null="true"
/>
[/CODE]
by
[CODE]
<property
name="precioUnitario"
[b] type="java.math.BigDecimal"
precision="9"
scale="2" [/b]
update="true"
insert="true"
column="precioUnitario"
not-null="true"
/>
[/CODE]
just how work with a txt document,
i can do this manually maybe for one property but for 500 properties i see
this a suicide
exists a way to do this approcach with ant or other tool?
thanks in advanced
--
View this message in context:
http://www.nabble.com/some-way-to-resolve-this-with-ant-or-other-tool-tp14327577p14327577.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]