From: Gavin K. <ga...@ap...> - 2002-09-30 03:19:25
|
> Basically, there are two problems: > - the same foreign key is generated two times (artplFK1, artplFK2) That won't happen if you declare one end of the bidirectional association with readonly="true" which is the preferred style. > - big_decimal is mapped to a NUMERIC... according to the Postgres > documentation "NUMERIC without any precision or scale creates a column in > which numeric values of any precision and scale can be stored, up to > the implementation limit on precision." That seems to be a little overkill > to me, moreover I've specified a length=2, so I expect something like > NUMERIC(x,2) (SAPDB dialect outputs FIXED(19,2)) Yeah, I know.....I didn't quite know what to do about NUMERIC types....we really should allow precision and scale attributes as well as length, but that is starting to complicate the DTD too much. What we will probably have to do eventually is allow them on the <column> element rather than the <property> elements, etc. However, you can already do this: <property name="cost" type="big_decimal"> <column sql-type="NUMERIC(19,2)"/> </property> Which is actually less typing than: <property name="cost" type="big_decimal"> <column precision="19" scale="2"> </property> So I couldn't be bothered with that just yet. Still, I know its suboptimal. The reason for the inconsistency between dialects is I would have preferred to handle it like Postgres for all dialects, but most of the databases default scale to 0, which is useless. If you are voluteering to fix this stuff, your help is very welcome ;) Gavin |