-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Double mapping with annotations
PostPosted: Tue Oct 16, 2007 9:29 am 
Newbie

Joined: Fri Oct 21, 2005 9:27 am
Posts: 13
Hi,

I have this mapping snippet in my application :

Code:
/* The number of volume classes */
public static final int VOLUME_COUNT = 6;
/* The volume classes */
@CollectionOfElements(fetch = FetchType.EAGER)
@JoinTable(
        name = "RATES_VOLUMES",
        joinColumns = @JoinColumn(name = "RATE_ID")         
)
@IndexColumn(name = "VOL_CLASS", base = 1)
private double[] volumeClasses = new double[VOLUME_COUNT];


I'm using the Oracle9Dialect class as dialect.
The problem is that the elements of the array are mapped in a column of type FLOAT. I'd like it to be of type NUMBER(7,4).
How can I achieve this with annotations and without being forced to change my double[] to BigDecimal[] ?

I've already tried to add
Code:
@Column(precision = 7, scale = 4)

to the mapping snippet, but it doesn't do anything !
By the way, I've read http://forum.hibernate.org/viewtopic.php?t=978630 and http://forum.hibernate.org/viewtopic.php?t=979025 but they don't answer my question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.