-
Notifications
You must be signed in to change notification settings - Fork 5
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
Abstract out each segmentRows argument #2
Comments
I further suggest we change the naming of the classes: |
Love the renaming! Fully agree also on making every piece into its own class, beautiful. Heres a thought (not sure if good or overkill): Make There is also a test section now, feel free to explore that and add tests where it makes sense :) Thank you! |
@septIO, can I get your email to send a private message? |
@ajthinking Good idea with splitting the segment into So, a segment is defined by sketch, a segment is test from a Let's have an Abstract Class called Let me know your thoughts of this |
Not sure I understand fully,
Yes!
We might want to add attributes to the PivotTableEntity sometimes though. And not necesserely do we need to resolve it first, if no further lines are provided the properties array will just be empty? To complicate matters further we might also need a PivotModelEntity? Not sure if this is language agnostic approach, but in Laravel you may treat the intermidiate table as its own model kind of. The current designs assumes every segment spawns a table. The lower ellips in the image is if we should support custom directives kind of like a "domain language". Not sure about that, it might make a mess of things. Taking a step back, regarding the Many to Many, what do you think is the most fool proof language agnostic way to express that? model1_model2 is not obvious even for Laravel users. |
The easiest, and best way to implement all of these at the sometime is by using a really good "pluralizer", and "singularizer". |
Its a cool idea! So this would mean going down the Maybe we can use what you are suggesting but put that as parameters instead. It could support multiple approaches: implicit foreign keysKeep current approach for simple relationships:
explicit foreign keysAllow custom named foreign key:
as TitleRowParameterUse the TitleRow to attach relationships
in case of many to many
We may still keep this convention:
let the user be explicit about pivot Models
or pivot Tables with custom names
|
I really like this idea! Also removes the confusion of model1_model2 relations, which is which. And we will be able to set the exact relations, and reverse relations.
|
Since we're gonna need to do some heavy work with a SegmentRow's arguments, it would make sense to have it being their own class.
I suggest this solution:
Notice, I'm already working on this, this is just to ask for comments and for future reference
The text was updated successfully, but these errors were encountered: