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(a)gmail.com>
To: "Jess Sightler" <jsightle(a)redhat.com>
Cc: wildfly-dev(a)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#mappi...
more details.
or even
http://stackoverflow.com/questions/9463240/how-to-configure-hibernate-to-...
--
tomaz
On Mon, Jan 20, 2014 at 4:08 PM, Jess Sightler <jsightle(a)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(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/wildfly-dev
>