[hibernate-dev] [Search] @Transformable vs @ProvidedId

Sanne Grinovero sanne at hibernate.org
Thu Aug 7 17:42:58 EDT 2014


On 7 August 2014 22:37, Hardy Ferentschik <hardy at hibernate.org> wrote:

>
> On 7 Jan 2014, at 19:56, Sanne Grinovero <sanne at hibernate.org> wrote:
>
> > I was hoping to drop @ProvidedId today as the original "marker"
> > functionality is no longer needed: since we have
> >
> >  org.hibernate.search.cfg.spi.SearchConfiguration.isIdProvidedImplicit()
> >
> > the option can be implicitly applied to all indexed entries, and the
> > annotation is mostly redundant in Infinispan since we added this.
> >
> > But actually it turns out it's a bit more complex as it servers a second
> > function as well: it's the only way for users to be able to specify a
> > FieldBridge for the ID.. so the functionality of this annotation is not
> > consumed yet.
>
> Wouldn’t an additional explicit @FieldBridge annotation work as well?
>

​Yes! But we'd need to apply it to the key type.
This implies changing it to allow target @Target(TYPE​), which doesn't make
much sense for our ORM users, but also the name "FieldBridge" is rather odd
to be applied on a type and not a field.


More information about the hibernate-dev mailing list