To be honest, I'm not 100% sure on which performance optimizations are in place and which are not. But for some examples AFAIK if you use e.g. on a ManyTone an IndexedEmbedded(includePaths= {"id"}
) it will initialize the entity as there is nothing to say "hey, we just need the id here and that is already available. The same goes in the case where the association is available in the second level cache but is considered dirty which doesn't matter if you just need the id. AFAIK if a @ContainedIn Object is being updated the owning entity would not have to recreate it's index document if the corresponding @IndexedEmbedded just contains an id field (this would only be relevant when the @ContainedIn object is newley created).
So, all I'm saying is that if the nature of the indexedembedded associated is being checked for having id-only associations we might able to eliminate a lot unnecessary indexing.
|