[hibernate/hibernate-search] c3aedc: HSEARCH-2409 Do not ignore the parent prefix on @E...
by GitHub
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-search
Commit: c3aedc762fb9ef4641fec2617e7b79224e16cc47
https://github.com/hibernate/hibernate-search/commit/c3aedc762fb9ef4641fe...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/AnnotationMetadataProvider.java
M orm/src/test/java/org/hibernate/search/test/embedded/Address.java
M orm/src/test/java/org/hibernate/search/test/embedded/EmbeddedTest.java
A orm/src/test/java/org/hibernate/search/test/embedded/Resident.java
Log Message:
-----------
HSEARCH-2409 Do not ignore the parent prefix on @ElementCollection @IndexedEmbeddeds
Commit: a8a77bde1ea8adbcafa45231515048fdbad28571
https://github.com/hibernate/hibernate-search/commit/a8a77bde1ea8adbcafa4...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M elasticsearch/pom.xml
M orm/src/test/java/org/hibernate/search/test/embedded/EmbeddedTest.java
Log Message:
-----------
HSEARCH-2397 Enabled tests around Embeddeds for Elasticsearch
Commit: 3c30979d86d1d9ff3c0241852b0adce243b16106
https://github.com/hibernate/hibernate-search/commit/3c30979d86d1d9ff3c02...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M elasticsearch/src/test/java/org/hibernate/search/elasticsearch/test/ElasticsearchIndexMappingIT.java
M elasticsearch/src/test/java/org/hibernate/search/elasticsearch/test/GolfPlayer.java
Log Message:
-----------
HSEARCH-2397 Added tests for @IndexedEmbeddeds whose prefix doesn't contain a dot
Commit: 0b9260fc1e988cdb846d8d0271726ab08a6ac014
https://github.com/hibernate/hibernate-search/commit/0b9260fc1e988cdb846d...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexWorkVisitor.java
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchNestingContextFactoryProvider.java
A elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/JsonElementType.java
A elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/JsonTreeBuilder.java
A elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/NestingMarker.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/AnnotationMetadataProvider.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/EmbeddedTypeMetadata.java
M engine/src/main/java/org/hibernate/search/engine/nesting/impl/NestingContext.java
M engine/src/main/java/org/hibernate/search/engine/nesting/impl/NoOpNestingContext.java
M engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M engine/src/main/java/org/hibernate/search/util/impl/CollectionHelper.java
Log Message:
-----------
HSEARCH-2397 Fixed indexing of embeddeds with Elasticsearch
* The nesting marker now carries typed data instead of a simple
string. This is necessary because of how embeddeds can be
mapped to arbitrary field paths (see the javadoc on
JsonTreeBuilder for more info).
* I chose to use nested arrays on the very next element for
property paths such as a[0].b[1].c mapped to field paths such
as a_b.c (which becomes a_b[0][1].c according to this
implementation choice).
* EmbeddedTypeMetadata is now part of the nesting marker. This
makes the JSON tree creation algorithm a bit simpler. As a
side-effect, the "this" marker in the NestingContext is not
necessary anymore.
squash! HSEARCH-2397 Fixed indexing of embeddeds with Elasticsearch
Commit: a713c5771ffe5fa26cea7f4df64e136ba522cce0
https://github.com/hibernate/hibernate-search/commit/a713c5771ffe5fa26cea...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchNestingContextFactoryProvider.java
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/FieldHelper.java
M engine/src/main/java/org/hibernate/search/engine/impl/DocumentBuilderHelper.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/EmbeddedTypeMetadata.java
M engine/src/main/java/org/hibernate/search/engine/spi/AbstractDocumentBuilder.java
M engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M engine/src/test/java/org/hibernate/search/test/metadata/IndexedEmbeddedWithDepthAndIncludePathTest.java
Log Message:
-----------
HSEARCH-2397 Renamed EmbeddedTypeMetadata.embeddedFieldName
... to embeddedPropertyName, because the previous name could be
misleading: this string does not realte to the index field name
at all.
Commit: 70f8428689ae24cec639dcebdaf06dff80320ac6
https://github.com/hibernate/hibernate-search/commit/70f8428689ae24cec639...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchHSQueryImpl.java
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexManager.java
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/ElasticsearchIndexWorkVisitor.java
M elasticsearch/src/main/java/org/hibernate/search/elasticsearch/impl/FieldHelper.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/AnnotationMetadataProvider.java
A engine/src/main/java/org/hibernate/search/engine/metadata/impl/BackReference.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/BridgeDefinedField.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/DocumentFieldMetadata.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/EmbeddedTypeMetadata.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/FieldMetadataBuilderImpl.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/PropertyMetadata.java
M engine/src/main/java/org/hibernate/search/engine/metadata/impl/TypeMetadata.java
M engine/src/main/java/org/hibernate/search/engine/spi/DocumentBuilderIndexedEntity.java
M engine/src/test/java/org/hibernate/search/test/bridge/builtin/TikaBridgeTest.java
Log Message:
-----------
HSEARCH-2397 Fix type detection with ES for embeddeds whose prefix doesn't contain a dot
The previous code was retrieving the source properties for document
fields by assuming that field names always match the property paths
exactly, which isn't true due to customizable @IndexedEmbedded
prefixes.
The solution is to augment the metamodel with back references, so that
document field metadata contains the reference to their source property,
thereby removing the need to guess the property from the field name.
I took this opportunity to also add back references from properties to
their declaring types, from embedded types to their source property, and
from document fields to their source type (useful for class bridges in
particular, where there's no source property). This part could be
removed, but it makes the metamodel more consistent.
Compare: https://github.com/hibernate/hibernate-search/compare/c246bd852931...70f8...
8 years
[hibernate/hibernate-orm] bf2bc3: HHH-11188 - SessionImpl.refresh() throws IllegalAr...
by GitHub
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-orm
Commit: bf2bc323f67214c629d5bc7c07c4c9bb03d4593d
https://github.com/hibernate/hibernate-orm/commit/bf2bc323f67214c629d5bc7...
Author: Andrea Boriero <andrea(a)hibernate.org>
Date: 2016-10-26 (Wed, 26 Oct 2016)
Changed paths:
M documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc
M documentation/src/main/asciidoc/userguide/chapters/pc/PersistenceContext.adoc
M hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryBuilderImpl.java
M hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsImpl.java
M hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsState.java
M hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryOptions.java
M hibernate-core/src/main/java/org/hibernate/boot/spi/SessionFactoryBuilderImplementor.java
M hibernate-core/src/main/java/org/hibernate/boot/spi/SessionFactoryOptions.java
M hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
M hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java
M hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java
A hibernate-core/src/test/java/org/hibernate/jpa/test/refresh/RefreshDetachedInstanceWhenIsAllowedTest.java
A hibernate-core/src/test/java/org/hibernate/jpa/test/refresh/RefreshDetachedInstanceWhenIsNotAllowedTest.java
A hibernate-core/src/test/java/org/hibernate/jpa/test/refresh/TestEntity.java
A hibernate-core/src/test/java/org/hibernate/test/refresh/RefreshDetachedInstanceWhenIsAllowedTest.java
A hibernate-core/src/test/java/org/hibernate/test/refresh/RefreshDetachedInstanceWhenIsNotAllowedTest.java
A hibernate-core/src/test/java/org/hibernate/test/refresh/TestEntity.java
Log Message:
-----------
HHH-11188 - SessionImpl.refresh() throws IllegalArgumentException, 'Entity not managed' for detached instances when JPA bootstrapped
8 years