[hibernate-dev] ORM 4.2.8.Final breaks the EntityKey API and thus HSearch

Guillaume Smet guillaume.smet at gmail.com
Thu Dec 5 11:09:42 EST 2013


Yes. This commit looks really nice: that's what looks really
interesting to me in 4.2.8. But providing a compatibility layer seems
necessary.

On Thu, Dec 5, 2013 at 5:06 PM, Scott Marlow <smarlow at redhat.com> wrote:
> Looks like this commit changed that
> https://github.com/hibernate/hibernate-orm/commit/bf26311474257c2f0118615e003553095c2d87b0
>
>
> On 12/05/2013 10:51 AM, Guillaume Smet wrote:
>>
>> Hi all,
>>
>> ORM 4.2.8.Final breaks the API of EntityKey as it removes tenantId
>> from the constructor.
>>
>> Typically, in HSearch, we have the following call:
>>
>> https://github.com/hibernate/hibernate-search/blob/master/orm/src/main/java/org/hibernate/search/query/hibernate/impl/PersistenceContextObjectsInitializer.java#L74
>>
>> As 4.2.8.Final removes the tenantId from the EntityKey constructor,
>> you get a nice:
>> java.lang.NoSuchMethodError:
>>
>> org.hibernate.engine.spi.EntityKey.<init>(Ljava/io/Serializable;Lorg/hibernate/persister/entity/EntityPersister;Ljava/lang/String;)V
>>      at
>> org.hibernate.search.query.hibernate.impl.PersistenceContextObjectsInitializer.initializeObjects(PersistenceContextObjectsInitializer.java:73)
>>
>>> From my point of view, the best way to go would be to reintroduce the
>>
>> constructor in EntityKey, mark it as deprecated and ignore the
>> tenantId.
>>
>> I think it's worth a respin and a 4.2.8.SP1.
>>
>> Thoughts?
>>
>> (btw, totally unrelated, it would be nice to have examples of the new
>> Maven plugin for bytecode enhancement).
>>
>
>
>


More information about the hibernate-dev mailing list