HSQLDB dialect : wrong type in generated DDL for BigDecimal

Description

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,

Environment

None

Activity

Show:
Fred Toussi
June 3, 2012, 11:22 AM

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.

Max Cheban
October 16, 2013, 1:23 PM

As a workaround you can extend HSQLDialect and use it

Brett Meyer
April 7, 2014, 5:41 PM

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!

Fred Toussi
April 8, 2014, 4:40 PM

The current HSQLDBDialect.java code in master branch is correct for both NUMERIC and DECIMAL SQL types.

Brett Meyer
July 8, 2014, 3:11 PM

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!

Rejected

Assignee

Unassigned

Reporter

Vianney Carel

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major