Java property name not correctly generated

Description

Hi,

I've the following tables:
INSTRUMENT(
ID (PK),
BASE_CURRENCY (FK),
UNDERLYING_CURRENCY
)

CURRENCY(
ID(PK),
ISO_CODE_3,
NAME
)

Where relation between the tables are as follow:
INSTRUMENT.BASE_CURRENCY 0..1> CURRENCY.ID
INSTRUMENT.UNDERLYING_CURRENCY 0..1> CURRENCY.ID

When running hibernate tool, I'm getting the following code generation:

@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="DISCRIMINATOR", discriminatorType=DiscriminatorType.INTEGER)
@Table(name="INSTRUMENT", uniqueConstraints = { @UniqueConstraint( columnNames = { "CODE" } ) })

public class Instrument implements java.io.Serializable {

// Fields

private long id;

private InstrumentType instrumentType;

private Currency currencyByBaseCurrency;

private Currency currencyByUnderlyingCurrency;
...

My question is why the names for the currencies are currencyByBaseCurrency, currencyByUnderlyingCurrency
when I'm expecting to have baseCurrency and underlyingCurrency?

Best regards

Environment

- Linux Fedora Core 3. - Oracle10. Driver ojdbc14.jar - JBossIDE nightly build of 25.02.2006

Activity

Show:

Max Rydahl Andersen September 14, 2006 at 6:48 PM

behavior fully customizable via reveng strategy

use forum.hibernate.org for usage questions.

Rejected

Details

Assignee

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

berdat joseph
Max Rydahl Andersen

Components

Affects versions

Priority

Created February 27, 2006 at 10:38 AM
Updated September 14, 2006 at 6:48 PM
Resolved September 14, 2006 at 6:48 PM