Hi,

I've forwarded your mail to hibernate-dev. Our mailing list is open, you can register at [1].

--Gunnar

[1] https://lists.jboss.org/mailman/listinfo/hibernate-dev




2014/1/20 Jess Sightler <jsightle@redhat.com>
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.

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).

The issue is that if you have a table starting with "and" (eg, "androidvariant"), then this code will think it starts with " and" (note the space). It will then proceed to rip off the first 4 characters, turning your table name into "oidvariant".

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

----- Original Message -----
> From: "Tomaž Cerar" <tomaz.cerar@gmail.com>
> To: "Jess Sightler" <jsightle@redhat.com>
> Cc: wildfly-dev@lists.jboss.org
> Sent: Monday, January 20, 2014 10:28:40 AM
> Subject: Re: [wildfly-dev] Hibernate Bug (tables starting with "and")...
>
> Question would be more suitable for hibernate-dev mailing list.
> but in any case i am pretty sure your fix is wrong, given that you can
> achieve what you want different way.
>
> see
> http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html/ch05.html#mapping-quotedidentifiersfor
> more details.
> or even
> http://stackoverflow.com/questions/9463240/how-to-configure-hibernate-to-put-quotes-around-table-names
>
> --
> tomaz
>
>
> On Mon, Jan 20, 2014 at 4:08 PM, Jess Sightler <jsightle@redhat.com> wrote:
>
> > Is there any chance of getting a fix for this into the 8.0.0.Final release?
> > https://github.com/hibernate/hibernate-orm/pull/658
> >
> > It seems to break a lot of generated queries on tables starting with "and".
> > _______________________________________________
> > wildfly-dev mailing list
> > wildfly-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/wildfly-dev
> >
>

_______________________________________________
wildfly-dev mailing list
wildfly-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/wildfly-dev