Skip to content
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

generated key delimiter not used in suffix if there was no prefix [DATACOUCH-571] #879

Closed
spring-projects-issues opened this issue Jun 19, 2020 · 0 comments
Assignees
Labels
type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jun 19, 2020

Michael Reiche opened DATACOUCH-571 and commented

isAppending only gets set when a prefix is used. It needs to also be set when attributes are appended and also when a UNIQUE key is appended.

if (prefixes.size() > 0) {
 appendKeyParts(sb, prefixes.values(), delimiter);
 isAppending = true;
}

if (generatedValue.strategy() == USE_ATTRIBUTES && idAttributes.size() > 0) {
 if (isAppending) {
  sb.append(delimiter);
 }
 appendKeyParts(sb, idAttributes.values(), delimiter);
}

if (generatedValue.strategy() == UNIQUE) {
 if (isAppending) {
  sb.append(delimiter);
 }
 sb.append(UUID.randomUUID());
}

if (suffixes.size() > 0) {
 if (isAppending) {
  sb.append(delimiter);
 }
 appendKeyParts(sb, suffixes.values(), delimiter);
}

Referenced from: pull request #234

Backported to: 4.0.2 (Neumann SR2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants