[hibernate-dev] why are embedded ids indexed?

Emmanuel Bernard emmanuel at hibernate.org
Mon Jun 6 06:32:33 EDT 2011


I mean this setting being set to true (RE OGM).

On 6 juin 2011, at 12:31, Emmanuel Bernard wrote:

> yep that's fine. I suspect this setting will be quite useful in Hibernate OGM's search engine though.
> On 6 juin 2011, at 12:27, Sanne Grinovero wrote:
> 
>> 2011/6/6 Emmanuel Bernard <emmanuel at hibernate.org>:
>>> That's a backward compatible change so it needs to be done in 4.0
>> 
>> That's why I'm proposing it now again. Would you agree on it?
>> 
>> Sanne
>> 
>>> On 6 juin 2011, at 11:58, Sanne Grinovero wrote:
>>> 
>>>> 2011/6/6 Emmanuel Bernard <emmanuel at hibernate.org>:
>>>>> 
>>>>> On 6 juin 2011, at 11:29, Sanne Grinovero wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> 2011/6/6 Emmanuel Bernard <emmanuel at hibernate.org>:
>>>>>>> Because somehow we need people to be able to index the id of embedded objects.
>>>>>> 
>>>>>> But why, we don't ever use it right? Is the purpose to make it
>>>>>> possible for people to include restrictions on the ids when creating
>>>>>> queries?
>>>>> 
>>>>> yes
>>>>> 
>>>>>> 
>>>>>>> And at the time, I decided that automatically indexing them was harmless.
>>>>>>> Either we stay as is or we add a specific annotation to ask for id indexing in embedded objects
>>>>>> 
>>>>>> Wouldn't @Field work for such purpose?
>>>>>> 
>>>>> 
>>>>> Not entirely as it would index the id twice when the @Indexed @Entity is top level
>>>> 
>>>> Right, so could we add an option to @DocumentId(includeWhenEmbedding=true) ?
>>>> 
>>>> I'd have it default to "false", as while I agree that i might be of
>>>> some use, I never needed it.
>>>> 
>>>> 
>>>>>> Sanne
>>>>>> 
>>>>>>> 
>>>>>>> Emmanuel
>>>>>>> 
>>>>>>> On 3 juin 2011, at 14:42, Sanne Grinovero wrote:
>>>>>>> 
>>>>>>>> About this post:
>>>>>>>> https://forum.hibernate.org/viewtopic.php?f=9&t=1011255
>>>>>>>> 
>>>>>>>> I remember this came up before, but I don't remember if we had
>>>>>>>> identified a good reason for why we're storing the ids for
>>>>>>>> @IndexedEmbedded objects?
>>>>>>>> 
>>>>>>>> Cheers,
>>>>>>>> Sanne
>>>>>>>> _______________________________________________
>>>>>>>> hibernate-dev mailing list
>>>>>>>> hibernate-dev at lists.jboss.org
>>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
> 
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev





More information about the hibernate-dev mailing list