[hibernate-dev] Fwd: [wildfly-dev] Hibernate Bug (tables starting with "and")...

Steve Ebersole steve at hibernate.org
Mon Jan 20 13:37:53 EST 2014


Yep, I'll make sure this gets into Hibernate ORM 4.3.1. Up to WildFly to 
decide if they want 4.3.1


On 01/20/2014 09:40 AM, Gunnar Morling wrote:
> Hi,
>
> Jess Sightler had sent the original mail below to wildfly-dev, but it seems
> more suited here.
>
> --Gunnar
>
> ---------- Forwarded message ----------
> From: Jess Sightler <jsightle at redhat.com>
> Date: 2014/1/20
> Subject: Re: [wildfly-dev] Hibernate Bug (tables starting with "and")...
> To: Tomaž Cerar <tomaz.cerar at gmail.com>
> Cc: wildfly-dev at lists.jboss.org
>
>
> 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 at gmail.com>
>> To: "Jess Sightler" <jsightle at redhat.com>
>> Cc: wildfly-dev at 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 at 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 at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>>>
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev



More information about the hibernate-dev mailing list