Skip to content

issue/element id #2718

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

Closed
wants to merge 17 commits into from
Closed

issue/element id #2718

wants to merge 17 commits into from

Conversation

michael-simons
Copy link
Collaborator

@michael-simons michael-simons commented May 3, 2023

  • prepare branch
  • retarget id calls
  • Remove elementid class without replacement
  • wip
  • more progress
  • sometime I'm not gonna forget to not commit this.
  • fix more things.
  • reactive
  • wip
  • looking better…
  • close
  • mostly working
  • moar work.
  • imperative done
  • reactive done
  • You have read the Spring Data Neo4j contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@@ -52,23 +52,22 @@ private IdentitySupport() {
* @param propertyAccessor An accessor to the entity
* @param entity As received via the driver
*/
public static void updateInternalId(Neo4jPersistentEntity<?> entityMetaData,
public static void updateElementId(Neo4jPersistentEntity<?> entityMetaData,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot spot any usage of this.

}
}

static <T> String notAGoodNameSoFar(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better than having nothing 😸

} else if (actualRelatedId == null) {
long internalId = databaseEntity.map(Entity::id).orElseThrow();
propertyAccessor.setProperty(requiredIdProperty, internalId);
// relatedInternalId = Long.toString(internalId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dead comment code

} finally {
lock.unlock(stamp);
}
}

@Nullable
public Long getInternalId(Object object) {
public String getInternalId(Object object) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename this to getObjectId or getElementId?

import org.springframework.data.neo4j.test.BookmarkCapture;
import org.springframework.data.neo4j.test.Neo4jExtension;

abstract class AbstractTestBase {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call it AbstractElementIdTestBase?

@michael-simons
Copy link
Collaborator Author

Thanks @meistermeier for your review. Fixed all of them.

@michael-simons michael-simons deleted the issue/element_id branch May 4, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants