Skip to content
Snippets Groups Projects
Verified Commit a978b4ef authored by Martin Weise's avatar Martin Weise
Browse files

Mapper fix

parent ee786ec9
Branches
Tags
1 merge request!368Dev
......@@ -483,7 +483,6 @@ public interface MetadataMapper {
@Mappings({
@Mapping(target = "databaseId", source = "tdbid"),
@Mapping(target = "isPublic", source = "database.isPublic"),
})
TableBriefDto tableToTableBriefDto(Table data);
......@@ -535,7 +534,7 @@ public interface MetadataMapper {
.internalName(data.getInternalName())
.owner(userToUserBriefDto(data.getOwner()))
.tdbid(data.getTdbid())
.isPublic(data.getDatabase().getIsPublic())
.isPublic(data.getIsPublic())
.isSchemaPublic(data.getIsSchemaPublic())
.isVersioned(true)
.description(data.getDescription())
......@@ -720,7 +719,7 @@ public interface MetadataMapper {
@Mappings({
@Mapping(target = "tableId", source = "table.id"),
@Mapping(target = "databaseId", source = "table.database.id"),
@Mapping(target = "isPublic", source = "table.database.isPublic"),
@Mapping(target = "isPublic", source = "table.isSchemaPublic"),
@Mapping(target = "description", source = "description"),
@Mapping(target = "table", ignore = true),
@Mapping(target = "views", ignore = true)
......
......@@ -403,7 +403,8 @@ public class TableEndpoint {
@NotNull Principal principal) throws NotAllowedException,
DataServiceException, DataServiceConnectionException, DatabaseNotFoundException, TableNotFoundException,
SearchServiceException, SearchServiceConnectionException {
log.debug("endpoint update table, databaseId={}, data.is_public={}", databaseId, data.getIsPublic());
log.debug("endpoint update table, databaseId={}, data.is_public={}, data.is_schema_public={}", databaseId,
data.getIsPublic(), data.getIsSchemaPublic());
final Table table = tableService.findById(databaseId, tableId);
if (!table.getOwner().equals(principal)) {
log.error("Failed to update table: not owner");
......
......@@ -220,8 +220,8 @@ public class TableServiceImpl implements TableService {
}
final Table tableEntity = optional.get();
tableEntity.setIsPublic(data.getIsPublic());
tableEntity.setDescription(data.getDescription());
tableEntity.setIsSchemaPublic(data.getIsSchemaPublic());
tableEntity.setDescription(data.getDescription());
final Database database = databaseRepository.save(table.getDatabase());
/* update in search service */
searchServiceGateway.update(database);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment