-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GEN-1434: Improvement : Show displayName for database and databaseSchema in explore tree #17876
Changes from all commits
71dd2a2
55cc05a
14134c2
a36b041
e4c6db8
89b9ff8
68181c2
d81327d
fdcdffb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
import java.util.Collections; | ||
import java.util.Comparator; | ||
import java.util.List; | ||
import java.util.Objects; | ||
import java.util.UUID; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.commons.csv.CSVPrinter; | ||
|
@@ -179,6 +180,18 @@ private void populateDatabase(DatabaseSchema schema) { | |
.withServiceType(database.getServiceType()); | ||
} | ||
|
||
@Override | ||
public void entityRelationshipReindex(DatabaseSchema original, DatabaseSchema updated) { | ||
super.entityRelationshipReindex(original, updated); | ||
|
||
// Update search indexes of assets and entity on databaseSchema displayName change | ||
if (!Objects.equals(original.getDisplayName(), updated.getDisplayName())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are reindexing the whole entity on just displayNameChange, should we just update the disaplayName? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this improvement will be handled in a different pr, will link the pr once it is ready |
||
searchRepository | ||
.getSearchClient() | ||
.reindexAcrossIndices("databaseSchema.fullyQualifiedName", original.getEntityReference()); | ||
} | ||
} | ||
|
||
@Override | ||
public String exportToCsv(String name, String user) throws IOException { | ||
DatabaseSchema schema = getByName(null, name, Fields.EMPTY_FIELDS); // Validate database schema | ||
|
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.
Do we need to do this explicitly, will the updateEntity() in search not take care of this ?
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.
updateEntity() currents only updates the inherited and propagated fields in children and not other fields of the parent entity