<HTML dir=ltr><HEAD><TITLE>Re: [hibernate-dev] HSQLDialect - sequences - problems with white space</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2800.1597" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText73200 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Created JIRA issue HHH-2839</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>David</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Steve Ebersole on behalf of Steve Ebersole<BR><B>Sent:</B> Mon 10-Sep-07 20:41<BR><B>To:</B> hibernate-dev@lists.jboss.org<BR><B>Cc:</B> David Balazic<BR><B>Subject:</B> Re: [hibernate-dev] HSQLDialect - sequences - problems with white space<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>On Monday 10 September 2007 11:29:36 am David Balazic wrote:<BR>> (since the mod did not approve my prevoius message, neither did Steve<BR>> reply, I subscribed and send it again) (I bet 5 seconds after I push SEND,<BR>> the moderator will approve my pending message and we will have two<BR>> copies...) Hi!<BR>Sorry, I generally do not reply to these type of emails sent directly to me. <BR>If you want to discuss Hibernate development, joining the development mailing<BR>list is not an undue hardship.<BR><BR>> I see 3 solutions:<BR>> - declare blank characters in <param name="sequence"> as illegal and be<BR>> done with it :-( - trim blank characters from the sequenceName argument in<BR>> method<BR>> org.hibernate.dialect.HSQLDialect.getCreateSequenceStrings(String) (and<BR>> others) or maybe before, when it is read from Configuration, in<BR>> org.hibernate.id.SequenceGenerator.configure - do not create a table for<BR>> each sequence. As I see it they are not really used, just needed as a dummy<BR>> table for the "SELECT NEXT VALUE FOR sequenceName FROM ..." statement. A<BR>> single table could be used for all sequences. Some "MY_COMMON_DUAL" thing.<BR><BR>Hibernate historically has not handled xml text very well imo. We used to<BR>have this same issue with stuff in cfg.xml, although I changed all that to<BR>use the trimmed text. However, blindly using trimmed text from a mapping<BR>file is not as viable.<BR><BR>So certainly we could have SequenceGenerator account for trimming the sequence<BR>name. I obviously have no objections to that.<BR><BR>As for not not creating the dual_* tables:<BR>1) I do not like (and will not code for) a "MY_COMMON_DUAL" approach; this is<BR>a simple oversight in HSQLDB (at least "back then", #2 alleviates that<BR>shortcoming)<BR>2) since when was the "call NEXT VALUE FOR [sequence_name]" syntax available? <BR>Depending on the answer to that, I have no issues with going this route;<BR>create a patch and attach to a JIRA request.<BR></FONT></P></DIV></BODY></HTML>