[hibernate-issues] [Hibernate-JIRA] Closed: (HBX-608) Java property name not correctly generated

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Thu Sep 14 12:49:24 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-608?page=all ]
     
Max Rydahl Andersen closed HBX-608:
-----------------------------------

    Resolution: Rejected

behavior fully customizable via reveng strategy

use forum.hibernate.org for usage questions.



> Java property name not correctly generated
> ------------------------------------------
>
>          Key: HBX-608
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-608
>      Project: Hibernate Tools
>         Type: Bug

>   Components: hbm2java
>     Versions: 3.1beta4
>  Environment: - Linux Fedora Core 3.
> - Oracle10. Driver ojdbc14.jar
> - JBossIDE nightly build of 25.02.2006
>     Reporter: berdat joseph

>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list