On 7 August 2014 22:37, Hardy Ferentschik <hardy(a)hibernate.org> wrote:
On 7 Jan 2014, at 19:56, Sanne Grinovero <sanne(a)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.