-
Notifications
You must be signed in to change notification settings - Fork 616
DATAGRAPH-1428 - Implement deleteAllById(Iterable<ID> ids). #554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this from VMWare's side, much appreciate it.
Please be so kind and remove the unrelated chances and have a look at the imperative test. While the reactive makes complete sense, I don't understand the unused additional person instance.
Thanks.
import org.springframework.data.neo4j.integration.shared.common.ThingWithAssignedId; | ||
import org.springframework.data.neo4j.integration.shared.common.ThingWithGeneratedId; | ||
import org.springframework.data.neo4j.integration.shared.common.WorksInClubRelationship; | ||
import org.springframework.data.neo4j.integration.shared.common.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep the explicit imports, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an import style config that we can configure on our side when touching Spring Data Neo4j? In other Spring Data modules, we apply https://github.com/spring-projects/spring-data-build/tree/master/etc/ide#intellij-setup.
import java.util.stream.IntStream; | ||
import java.util.stream.StreamSupport; | ||
|
||
import static org.assertj.core.api.Assertions.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the order change?
@@ -524,7 +492,8 @@ void findBySimplePropertiesAnded(@Autowired PersonRepository repository) { | |||
assertThat(optionalPerson).isPresent().contains(person1); | |||
} | |||
|
|||
@Test // GH-112 | |||
@Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
@@ -550,7 +519,8 @@ void findBySimplePropertiesOred(@Autowired PersonRepository repository) { | |||
assertThat(persons).containsExactlyInAnyOrder(person1, person2); | |||
} | |||
|
|||
@Test // DATAGRAPH-1374 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
@@ -562,7 +532,8 @@ void findSliceShouldWork(@Autowired PersonRepository repository) { | |||
assertThat(slice.hasNext()).isFalse(); | |||
} | |||
|
|||
@Test // DATAGRAPH-1412 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
@@ -2610,7 +2598,8 @@ void count(@Autowired PersonRepository repository) { | |||
assertThat(repository.count()).isEqualTo(2); | |||
} | |||
|
|||
@Test // GH-112 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
interface SimilarThingRepository extends Neo4jRepository<SimilarThing, Long> {} | ||
interface SimilarThingRepository extends Neo4jRepository<SimilarThing, Long> { | ||
} | ||
|
||
interface BaseClassRepository extends Neo4jRepository<Inheritance.BaseClass, Long> {} | ||
interface BaseClassRepository extends Neo4jRepository<Inheritance.BaseClass, Long> { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
interface BaseClassWithLabelsRepository extends Neo4jRepository<Inheritance.BaseClassWithLabels, Long> {} | ||
interface BaseClassWithLabelsRepository extends Neo4jRepository<Inheritance.BaseClassWithLabels, Long> { | ||
} | ||
|
||
interface EntityWithConvertedIdRepository | ||
extends Neo4jRepository<EntityWithConvertedId, EntityWithConvertedId.IdentifyingEnum> {} | ||
extends Neo4jRepository<EntityWithConvertedId, EntityWithConvertedId.IdentifyingEnum> { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
interface FriendRepository extends Neo4jRepository<Friend, Long> {} | ||
interface FriendRepository extends Neo4jRepository<Friend, Long> { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
@Autowired private Driver driver; | ||
@Autowired | ||
private Driver driver; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo.
import org.springframework.data.neo4j.integration.shared.common.ThingWithAssignedId; | ||
import org.springframework.data.neo4j.integration.shared.common.ThingWithGeneratedId; | ||
import org.springframework.data.neo4j.integration.shared.common.WorksInClubRelationship; | ||
import org.springframework.data.neo4j.integration.shared.common.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an import style config that we can configure on our side when touching Spring Data Neo4j? In other Spring Data modules, we apply https://github.com/spring-projects/spring-data-build/tree/master/etc/ide#intellij-setup.
@@ -3151,18 +3140,24 @@ void shouldFindExtendedNodeViaExtendedAttribute(@Autowired ParentRepository repo | |||
} | |||
} | |||
|
|||
interface BidirectionalStartRepository extends Neo4jRepository<BidirectionalStart, Long> {} | |||
interface BidirectionalStartRepository extends Neo4jRepository<BidirectionalStart, Long> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our formatter config is at https://github.com/spring-projects/spring-data-build/blob/master/etc/ide/eclipse-formatting.xml. Let me know whether the formatting changes here stem from our config so we can fix that on our side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we had this applied. My bad if that isn't the case.
Regarding the star imports: Isn't the common agreement that they should be avoided? At least that was my impression when I did this: 7804bdc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your code is fine, I assume some IDE settings or an outdated config on our side.
RE star imports: Each Spring project has its own approach to code style. Following the Boot style is fine, it would be good to document that somewhere as the Spring Data import style looks different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit surprised that Jenkins is happy… I just tracked the branch and a mvn checkstyle:check@validate
fails as expected. Checkstyle runs in verify
phase, after all tracks (as we discussed a while back in d824e5d).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the associated Job fails (https://jenkins.spring.io/view/SpringData/job/spring-data-neo4j/job/issue%252FDATAGRAPH-1428/4/). It's green because we suppress upstream trigger causes. For some reason, the suppression still creates a no-op job that appears to be green.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't have the proper code formatting applied. I fixed that but still have some changes left. I'll undo them manually.
The points where the formatting of Neo4J differs from Spring Data seems to be:
- Spring Data Formatting prescribes star imports for static imports and for 10 or more imports.
- The import order seams to be subtly different, the ordering of subpackages is different.
…gerTest, too. This allows for development against changes in commons which aren't on master yet.
The additional person allows to actually delete multiple persons, without deleting all of them.
19e4089
to
d7aef08
Compare
The third person now gets saved, allowing us to delete more than one person without deleting all. |
…deleteAllById(Iterable<ID> ids). Original pull request: #554.
…gerTest, too. This allows for development against changes in commons which aren't on master yet. Original pull request: #554.
Reorder methods. Fix import ordering. Original pull request: #554.
That's merged and polished now. |
Merge right after DATACMNS-800