From: "Davide D'Alto" <daltodavide(a)gmail.com>
 Date: 1 août 2011 14:29:57 HAEC
 To: Emmanuel Bernard <emmanuel(a)hibernate.org>
 Subject: Re: [hibernate-dev] [HSEARCH-566] Indexing null values for an
@ElementCollection
 
 >> That's great, it is much cleaner. I was leaning for the "less
 >> annotations, we can figure it out" but indeed I like the "least
 >> surprise" principle more, and this is not more verbose either. Though
 >> Davide will hate me as binding the bridge will need to be different
 >> than his current pull request :)
 No problem :)
 
 >> Davide, what do you think of this? And can you add the agreed points
 >> to the unit tests, mainly the DateBridge, resolution and NumericField
 >> tests with custom precision, and above all checking for the capability
 >> to override whatever your patch does with a custom bridge?
 As a user I wouldn't be so confused about using the @DateBridge with a collection of
Date but it seems to make sense to use @IndexEmbedded.
 I think I will change the code for this scenario so that we can see the number of
annotations used in this case and contunue from there.
 
 I will remove the indexing of a null collection/array as well.
 
 
 On Mon, Aug 1, 2011 at 1:04 PM, Emmanuel Bernard <emmanuel(a)hibernate.org> wrote:
 
 >>> @IndexedEmbedded
 >>> @DateBridge(resolution=Resolution.DAY)
 >>> private Set<Date> views;
 >
 >>> Of course this clashes in case people want both the proposed behavior
 >>> and use a custom field bridge in parallel. But such feature is not
 >>> supported by the currently proposed syntax either
 >>
 >> That's great, it is much cleaner. I was leaning for the "less
 >> annotations, we can figure it out" but indeed I like the "least
 >> surprise" principle more, and this is not more verbose either. Though
 >> Davide will hate me as binding the bridge will need to be different
 >> than his current pull request :)
 >> Davide, what do you think of this? And can you add the agreed points
 >> to the unit tests, mainly the DateBridge, resolution and NumericField
 >> tests with custom precision, and above all checking for the capability
 >> to override whatever your patch does with a custom bridge?
 >
 > I find @IndexedEmbedded as ambiguous, besides you are adding an additional
 > annotation
 > since @ElementCollection is still there, right? Just saying there are
 > quite a few annotations.
 
 Note that @ElementCollection is the JPA annotation that might or might not be present
(HSearch on Infinispan doesn't use JPA annotations).
 
 My reasoning for liking @IndexedEmbedded is that whether basic, embeddable or entity
collection, it's still a collection and we still embed the information into the
index.
 _______________________________________________
 hibernate-dev mailing list
 hibernate-dev(a)lists.jboss.org
 
https://lists.jboss.org/mailman/listinfo/hibernate-dev