]
Andrew C. Oliver commented on ANN-748:
--------------------------------------
I looked at the actual bug a bit more. It looks like the JoinColumn mapping assumes that
the column definition is completely void even if it was also defined by ManyToOne.. Also
it might make sense to have a Hibernate specific @JoinColumn since @Column is not allowed
that would allow you to override precision etc.
@JoinColumn overrides scale and percision in ManyToOne map..
------------------------------------------------------------
Key: ANN-748
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-748
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.4.0.CR1
Environment: Postgresql but not Hypersonic (haven't tried other DBs, but
suspect any real non-java db will replicate)
Reporter: Andrew C. Oliver
Attachments: patch.tar.gz
http://forum.hibernate.org/viewtopic.php?t=987527
Since you asked nicely...
This is a patch against your test cases.
Sorry for the not patch style patch. It is against the latest download of Annotations
(3.4.0.CR1). I'm on a hotel network that seems to really make SVN angry.
There are 4 files:
1. Bunny has many
2. PointyTooth (teeth)
3. IdTest.java, only "testBlownPrecision" is new and "getMappings"
includes the rabid bunny and teeth
4. UUIDGenerator - I wouldn't have included it but I couldn't find a decent way
to autogenerate 128-bit keys. (The linked wikipedia article is amusing).
You'll probably want to unzip these into the annotations root directory, then do the
svn diff. Following this you may want to pretty print.
As the test notes, it will FAIL with the @JoinColumn mapping and succeed if it is
commented out. The failure notes a precision error. Obviously batching must be disabled
to read it. If you look at the generated table it will have like NUMBER[19]. With
JoinColumn commented out it is the expected NUMBER[128]. Thanks to PaaKow Acquah for
finding this.
If you want more details, I'll be a TacoMac having another Aventinus...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: