On Mon, 01 Aug 2011 13:01:02 +0200, Sanne Grinovero <sa...@hibernate.org> wrote:
>>> @Field >>> @DateBridge(resolution=Resolution.DAY) >>> private Set<Date> views; >>> >>> I think it's quite clear what the user meant to do, don't you? >> >> I personally find it confusing that we reuse the same @Field at the >> same place for a different target. But if people are of the opposite >> opinion, I can give up. > > I don't want you to give up, nor I can find references on the forum to > find what exactly was said, so it was my impression that this syntax > was very clean and self speaking, but since we're discussing on it, > that's evidence enough that this is not self speaking at all so I'm > not backing my proposal anymore. I back up Emmanuel's comment about potential confusion. I don't think adding a @CollectionField is such an overhead and it could have nested parameters for things like @Reolution, etc >> @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. --Hardy _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev