[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-756?page=co...
]
Chris Wilson commented on HHH-756:
----------------------------------
I do consider this a bug as well. I'm being given hbm mapping files with quotes in
them. Hibernate doesn't do anything at all to escape characters in these fields. From
org.hibernate.mapping.Table sqlCommentStrings():
StringBuffer buf = new StringBuffer()
.append( "comment on table " )
.append( tableName )
.append( " is '" )
.append( comment )
.append( "'" );
comments.add( buf.toString() );
It is useful to have apostrophe/single quote and also double quote characters within
<comment> elements, and I would like Hibernate to support that:
<many-to-one name="country"
class="org.wfp.rita.dao.Country" fetch="select">
<column name="cntcctryid">
<comment>Contact's address country</comment>
</column>
</many-to-one>
"Doctor, it hurts if I do this..." is not always a good excuse. E.g. if you say
"Doctor, it hurts when I breathe", the correct answer is not "well,
don't do that". If the use case is valid and useful then it should not be excused
away IMHO.
Please reopen this bug.
schema export tool does not check for apostrophe within the
<comment></comment> tags
-------------------------------------------------------------------------------------
Key: HHH-756
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-756
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.0.5
Reporter: Craig Baker
Priority: Trivial
If an apostrophe appears within <comment> </comment> tag, schema export tool
fails to create valid DDL syntax.
eg.
<hibernate-mapping>
..
<comment>The user's session</user>
..
</hibernate-mapping>
produces
create table (
..
) comment = 'The user's session';
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira