Closed nathggns closed 11 years ago
You mean foreign keys? Remove them by default, there should be a method to keep them on query- and model-level.
Actually we might want to keep them. Nobody has to use them, if they don't want to. However if they want to, they shouldn't be required to take extra steps.
I mean, on export, at least. It's just a bit weird to have like user_id and them an id inside user. — Nathaniel Higgins http://nath.is
On Sat, Jun 1, 2013 at 11:03 PM, Claudio Albertin notifications@github.com wrote:
You mean foreign keys? Remove them by default, there should be a method to keep them on query- and model-level.
Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-18797832
What does exporting even do? Where is the data used?
Exporting takes a model and turns it into an array. — Nathaniel Higgins http://nath.is
On Sat, Jun 1, 2013 at 11:06 PM, Claudio Albertin notifications@github.com wrote:
What does exporting even do? Where is the data used?
Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-18797881
Do models use lazy-loading for (first-level) relationships? The export function should certainly take a level argument, and I think it should default to 0 (no relationships contained in the export).
It defaults to 1, which means that first level relationships are exported. Everything in Models are lazy loaded. — Nathaniel Higgins http://nath.is
On Sat, Jun 1, 2013 at 11:12 PM, Claudio Albertin notifications@github.com wrote:
Do models use lazy-loading for (first-level) relationships?
The export function should certainly take a level argument, and I think it should default to 0 (no relationships contained in the export).
Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-18797957
Default to 0. It makes more sense to me to start with nothing than in the middle basically, with 1.
Hm. We have an actual user that wants first level relationships to export. @andrewhathaway — Nathaniel Higgins http://nath.is
On Sat, Jun 1, 2013 at 11:15 PM, Claudio Albertin notifications@github.com wrote:
Default to 0. It makes more sense to me to start with nothing than in the middle basically, with 1.
Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-18798016
That might be, but then he can simply give the wanted level as an argument to export
.
Set the default as a property on the model maybe? — Nathaniel Higgins http://nath.is
On Sat, Jun 1, 2013 at 11:18 PM, Claudio Albertin notifications@github.com wrote:
That might be, but then he can simply give the wanted level as an argument to
export
.Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-18798071
I think it makes a lot more sense to set it on request. The export()
method requests data after all, and a request has to specify options.
Yes, but it has to default to one or the other, so having it as a property just gives the class the ability to change the default. I don't see the harm there. — Nathaniel Higgins http://nath.is
On Sat, Jun 8, 2013 at 7:13 PM, Claudio Albertin notifications@github.com wrote:
I think it makes a lot more sense to set it on request. The
export()
method requests data after all, and a request has to specify options.Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-19152935
It's pointless. Don't add pointless stuff. Also it would result in a "I feel lucky" type of export, you never know what you're actually going to get. Don't do this.
I guess. What should be the default? — Nathaniel Higgins http://nath.is
On Sat, Jun 8, 2013 at 8:31 PM, Claudio Albertin notifications@github.com wrote:
It's pointless. Don't add pointless stuff. Also it would result in a "I feel lucky" type of export, you never know what you're actually going to get. Don't do this.
Reply to this email directly or view it on GitHub: https://github.com/Scaffold/Scaffold/issues/127#issuecomment-19154118
Just remove this. Silly idea.
Should the column used to create the relationship be removed in exported data if the relationship is also exported? Seems like irrelevant data. Maybe make it an option at the class or method level?