I have a requirement to display some price data using different formats according to its origin, i.e. decimal places vary, or are shown as fractions e.g. 129 21/32

My idea is to use 'embeddable' to persist a field of type MyBigDecimalWrapper which knows how to display itself, i.e. it has a BigDecimal and an enum specifying display type.

However I then realised I would need to have an extra column for every price column.

This seems like overkill, considering that some persistent entities might have five price fields and the display type is the same for each.

There is no way around this, is there, because I can't map a column more than 
once?

Reply via email to