Skip to content
Snippets Groups Projects
Verified Commit e6f69077 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

ENH: Initialize auto-inserted files with NULL names.

parent 1428ea4e
No related branches found
No related tags found
2 merge requests!96DOC: Added CITATION.cff to the list of files in the release guide where the...,!85ENH: No automatic name for mass-imported File entities
Pipeline #34819 failed
......@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ###
* The default behavior of the query FIND SomeName [...] (as well as COUNT and SELECT) is being made configurable and changes
* The default behavior of the query `FIND SomeName [...]` (as well as COUNT and SELECT) is being
made configurable and changes:
* `FIND SomeName` will be interpreted as `FIND <FIND_QUERY_DEFAULT_ROLE>
SomeName` from now on where `FIND_QUERY_DEFAULT_ROLE` is a newly introduced
server property.
......@@ -21,7 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`FIND <FIND_QUERY_DEFAULT_ROLE>`.
* Of course, administrators can choose to retain the old behavior by setting
`FIND_QUERY_DEFAULT_ROLE=ENTITY`.
* CQL now treats `WITH` and `WITH A` equivalently. This is for [#192](https://gitlab.com/caosdb/caosdb-server/-/issues/192).
* CQL now treats `WITH` and `WITH A` equivalently. Issue: [#192](https://gitlab.com/caosdb/caosdb-server/-/issues/192)
* The InsertFilesInDir FlagJob now creates File entities without a name. The previous behavior
caused severe performance problems for very large numbers of files. Issue: [#197](https://gitlab.com/caosdb/caosdb-server/-/issues/197)
### Deprecated ###
......
......@@ -276,9 +276,9 @@ public class InsertFilesInDir extends FlagJob {
*/
private EntityInterface createInsertFileEntity(String name) {
if (getTransaction() instanceof WriteTransactionInterface) {
return new InsertEntity(name, Role.File);
return new InsertEntity((String) null, Role.File);
}
EntityInterface result = new RetrieveEntity(name);
EntityInterface result = new RetrieveEntity((String) null);
result.setRole(Role.File);
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment