ejb3 annotations formula - wrong string literals

Description

hbm2java generates wrong ejb3 code adding extra CR when mapping a formula inside a CDATA

Mapping:
<property name="dosis" type="string">
<meta attribute="field-description">Dosis</meta>
<formula>
<![CDATA[ (SELECT c.tx_dosis FROM DOSIS c WHERE c.id_dosis = id_dosis)]]>
</formula>
</property>

Generated code:

@Formula(value="

(SELECT c.tx_dosis FROM DOSIS c WHERE c.id_dosis = id_dosis)

")
public String getDosis() {
return this.dosis;
}

Environment

Hibernate Core 3.2.6.ga Hibernate Tools 3.2.3.GA SQL Server 2000

Activity

Show:

Koen Aers December 9, 2024 at 5:06 PM

I am closing this issue as it did not have any relevant updates since 2009. Please feel free to reopen it if you think it is still relevant.

Won't Fix

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

Former user
Koen Aers

Community Help Wanted

Yes, please

Original estimate

Time tracking

No time logged8h remaining

Components

Fix versions

Priority

Created February 17, 2009 at 7:07 PM
Updated December 9, 2024 at 5:06 PM
Resolved December 9, 2024 at 5:06 PM