Hi,
I get a wrong column type in the generated DDL when using the @Column annotation for a BigDecimal property.
My Java code:
@Column
public BigDecimal getAmount()
{
return amount;
}
The generated table creation instruction :
create table inv_invoice (id bigint not null, amount numeric, primary key (id))
The generated type should be "decimal" (with optionaly precision and scale) and not "numeric".
Thanks,
With HSQLDB (version 2.x and above), DECIMAL and NUMERIC are equivalent (SQL Standard allows). DECIMAL or NUMERIC types declared without scale default to scale 0 (SQL Standard mandates). Therefore what may be needed is not the DECIMAL keyword, but the inclusion of a precision and non-zero scale in the generated type.
As a workaround you can extend HSQLDialect and use it
In an effort to clean up, in bulk, tickets that are most likely out of date, we're transitioning all ORM 3 tickets to an "Awaiting Test Case" state. Please see http://in.relation.to/Bloggers/HibernateORMJIRAPoliciesAndCleanUpTactics for more information.
If this is still a legitimate bug in ORM 4, please provide either a test case that reproduces it or enough detail (entities, mappings, snippets, etc.) to show that it still fails on 4. If nothing is received within 3 months or so, we'll be automatically closing them.
Thank you!
The current HSQLDBDialect.java code in master branch is correct for both NUMERIC and DECIMAL SQL types.
Bulk rejecting stale issues. If this is still a legitimate issue on ORM 4, feel free to comment and attach a test case. I'll address responses case-by-case. Thanks!