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

XML Import: IDs ignored #201

Open
iluxonchik opened this issue May 7, 2016 · 1 comment
Open

XML Import: IDs ignored #201

iluxonchik opened this issue May 7, 2016 · 1 comment
Labels
Milestone

Comments

@iluxonchik
Copy link
Contributor

Currently the id attributes of Files in XML import are being ignored (i.e. the id attribution is left to domain entities).

Should this be fixed? Please note, that a "fix" would imply some additional consistency checking when importing from XML. For example, assume that the largest id in xml is 100. Next, a plain is imported, with a non-existent path: /did/not/exit/plain.txt and that plain has an id of 11. We cannot give /did an id of 11, so for those cases we would need to have some sort of "reverse counter" (for example it starts at Integer.MAX_VALUE and gets decremented with every previously unspecified directory created).

@iluxonchik iluxonchik added this to the sprint-3 milestone May 7, 2016
@nuno-silva
Copy link
Owner

  • I think you should sort the Files by ID when importing. That way, you make sure that parent's and such are consistent.
  • If XML files can be imported more than once (not just on FileSystem initialization), you could sort file Files by ID and then ignore the ID when creating the File
  • If you don't want to keep the FileSystem exactly has it was when exported (e.g. with the same ID), then you could ignore the ID and sort the files by path when importing instead.

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

No branches or pull requests

2 participants