Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,6 @@ private List<String> mapPropertyPath(PersistentEntity<?, ?> rootEntity, List<Str

for (PersistentProperty<?> persistentProperty : persistentProperties) {

if (associations.isLinkableAssociation(persistentProperty)) {
return Collections.emptyList();
}

persistentPropertyPath.add(persistentProperty.getName());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 original author or authors.
* Copyright 2016-2023 original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -117,19 +117,19 @@ void shouldMapKnownNestedProperties() {
assertThat(translatedSort.getOrderFor("embedded.someInterface")).isNotNull();
}

@Test // DATAREST-910
void shouldSkipWrongNestedProperties() {
@Test // DATAREST-1280
void shouldKnownAssociationProperties() {

Sort translatedSort = sortTranslator.translateSort(Sort.by("embedded.unknown"),
Sort translatedSort = sortTranslator.translateSort(Sort.by("association.name"),
mappingContext.getRequiredPersistentEntity(Plain.class));

assertThat(translatedSort).isEqualTo(Sort.unsorted());
assertTrue(translatedSort.isSorted());
}

@Test // DATAREST-910, DATAREST-976
void shouldSkipKnownAssociationProperties() {
@Test // DATAREST-910
void shouldSkipWrongNestedProperties() {

Sort translatedSort = sortTranslator.translateSort(Sort.by("association.name"),
Sort translatedSort = sortTranslator.translateSort(Sort.by("embedded.unknown"),
mappingContext.getRequiredPersistentEntity(Plain.class));

assertThat(translatedSort).isEqualTo(Sort.unsorted());
Expand Down