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

Self-hosted sync engine parent folder reference #436

Open
VinceWilkie opened this issue Feb 16, 2017 · 1 comment
Open

Self-hosted sync engine parent folder reference #436

VinceWilkie opened this issue Feb 16, 2017 · 1 comment

Comments

@VinceWilkie
Copy link

The Folder Table:
The table itself has no parent references and I haven't found any other tables that reveal parent folder references. I've been trying to design a way to selectively traverse folders by using the name column.

Note: I am currently using version 5.4 of Laravel.

Let's say I have the following folder records:
Folder 1
Folder 1/Folder 1.1
Folder 1/Folder 1.2
Folder 1/Folder 1.2/Folder 1.2.1

I've been able to use a combination of like and not like to capture a certain level of folders but it's proven difficult to get it using some kind of Laravel eloquent relationship.

Is there any way a parent folder relationship can added to the folder table?
A "parent" column could be added to the folder table that would reference the folder tables id column?
Or another (parent folder?) table could have two columns that reference the folder tables id column?

Ideally, I don't want to be selecting all folders to manage hierarchy because there could potentially be thousands of folders.

@coastermcgee
Copy link

A parent column would definitely be helpful in my opinion. Since the folders are being stored as a materialized path having a parent_id field would make it a snap to use in Laravel!

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

No branches or pull requests

2 participants