<div dir="ltr">Hi,<div><br></div><div>I&#39;ve forwarded your mail to hibernate-dev. Our mailing list is open, you can register at [1].</div><div><br></div><div>--Gunnar</div><div><br></div><div>[1] <a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a></div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/20 Jess Sightler <span dir="ltr">&lt;<a href="mailto:jsightle@redhat.com" target="_blank">jsightle@redhat.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree, but I am not on hibernate-dev, unfortunately, and this seems like an issue that could affect a lot of people if it goes into the Wildfly final release.<br>

<br>
I believe that you have misunderstood the issue here. The issue is not putting quotes around it (although I guess that might work around the bug).<br>
<br>
The issue is that if you have a table starting with &quot;and&quot; (eg, &quot;androidvariant&quot;), then this code will think it starts with &quot; and&quot; (note the space). It will then proceed to rip off the first 4 characters, turning your table name into &quot;oidvariant&quot;.<br>

<br>
Note how the code also does not do what the comment describing it says it will do. Ie, it tries to remove &quot; and&quot; and &quot;and &quot;, but only checks for &quot;and&quot; (no spaces) before doing the trimming.<br>

<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
&gt; From: &quot;Tomaž Cerar&quot; &lt;<a href="mailto:tomaz.cerar@gmail.com">tomaz.cerar@gmail.com</a>&gt;<br>
&gt; To: &quot;Jess Sightler&quot; &lt;<a href="mailto:jsightle@redhat.com">jsightle@redhat.com</a>&gt;<br>
&gt; Cc: <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt; Sent: Monday, January 20, 2014 10:28:40 AM<br>
&gt; Subject: Re: [wildfly-dev] Hibernate Bug (tables starting with &quot;and&quot;)...<br>
&gt;<br>
&gt; Question would be more suitable for hibernate-dev mailing list.<br>
&gt; but in any case i am pretty sure your fix is wrong, given that you can<br>
&gt; achieve what you want different way.<br>
&gt;<br>
&gt; see<br>
&gt; <a href="http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch05.html#mapping-quotedidentifiersfor" target="_blank">http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch05.html#mapping-quotedidentifiersfor</a><br>

&gt; more details.<br>
&gt; or even<br>
&gt; <a href="http://stackoverflow.com/questions/9463240/how-to-configure-hibernate-to-put-quotes-around-table-names" target="_blank">http://stackoverflow.com/questions/9463240/how-to-configure-hibernate-to-put-quotes-around-table-names</a><br>

&gt;<br>
&gt; --<br>
&gt; tomaz<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Jan 20, 2014 at 4:08 PM, Jess Sightler &lt;<a href="mailto:jsightle@redhat.com">jsightle@redhat.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Is there any chance of getting a fix for this into the 8.0.0.Final release?<br>
&gt; &gt; <a href="https://github.com/hibernate/hibernate-orm/pull/658" target="_blank">https://github.com/hibernate/hibernate-orm/pull/658</a><br>
&gt; &gt;<br>
&gt; &gt; It seems to break a lot of generated queries on tables starting with &quot;and&quot;.<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; wildfly-dev mailing list<br>
&gt; &gt; <a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a><br>
&gt; &gt;<br>
&gt;<br>
<br>
_______________________________________________<br>
wildfly-dev mailing list<br>
<a href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a></div></div></blockquote></div><br></div>