<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
Chris,<BR>
<BR>
I created a JIRA for this with a patch on 7/Jul/8. See HHH-3379.<BR>
<BR>
Thanks,<BR>
Daniel.<BR>
<BR>
On Mon, 2009-05-04 at 16:22 -0400, Chris Bredesen wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Daniel,
Thanks for the work on this. You should file a JIRA and include your
patch there so it can be considered for inclusion.
Cheers,
Chris
Daniel Bell wrote:
> Hi,
>
> I have recently tried turning on SQL comments in hibernate 3.2.6.ga.
> However, I found that our database (informix 7.31) did not support SQL
> where the comment was at the start of the comment. Instead, the comment
> needed to be after the SQL. For example:
>
> /* not accepted by informix 7.31*/ select * from systables;
>
> select * from systables /* accepted by informix 7.31*/
>
> Because of this, I have added a method to the Dialect for adding comments:
>
> /**
> * Add a comment to the SQL string.
> *
> * @param sql StringBuffer holding the SQL.
> * @param comment Comment to add to the SQL. May be null.
> */
> public void addCommentToSql(StringBuffer sql, String comment) {
> if (StringHelper.isNotEmpty(comment))
> sql.insert(0, "/* " + comment + " */ ");
> }
>
> Thus, the default implementation provides the same functionality as
> before. However, derived Dialects may override this method to add the
> comment in a different location.
>
> It is also possible to add additional comments in the derived Dialect.
> In our case, we also add the Java thread ID.
>
> I have included a complete patch for this change for hibernate 3.2.6.GA.
> Please consider its inclusion in Hibernate.
>
> Thanks,
> Daniel.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> hibernate-dev mailing list
> <A HREF="mailto:hibernate-dev@lists.jboss.org">hibernate-dev@lists.jboss.org</A>
> <A HREF="https://lists.jboss.org/mailman/listinfo/hibernate-dev">https://lists.jboss.org/mailman/listinfo/hibernate-dev</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>