[hibernate-dev] [HSEARCH-566] Indexing null values for an @ElementCollection

Hardy Ferentschik hardy at hibernate.org
Mon Aug 1 04:05:53 EDT 2011


On Mon, 01 Aug 2011 09:41:05 +0200, Emmanuel Bernard  
<emmanuel at hibernate.org> wrote:

> We're back to the same problem over and over but to me the best mapping  
> in Java 8 will be:
>
> @ElementCollection
> Collection<@Field(bridge=StringBridge.class) String> tags

right. same for HV and the ability to specify constraints for the elements
of a "basic" collection.


> But until then we need to find alternatives. I can see two alternatives
>
> 1. use a custom @ElementField annotation
>
> This annotation will represent the element in a collection.
> I like this idea as it forward compatible with Java 8's approach

I like this best and that's what I meant w/ @ElementCollectionField, but
@ElementField is better

--Hardy



More information about the hibernate-dev mailing list