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
Composite foreign Key to single other key #76
Comments
hello can you please elaborate your question so we may probably find a solution.
if so, then I may disappoint you, because this is something not easily achievable, at least for relational DBs. You may emulate such relation but in the end you won't build a single JOIN on such PKs. Such PK will work only on INSERT ... ON DUPLICATE KEY UPDATE statement, so in the end you kinda "must" to have 2 extra columns to make the join on searches during selections. regards |
You nailed what I'm looking to do, and I never said it had to apply to a relational db. My use case is a legacy (cobol) system that I'm connecting to and their data structures are too time intensive to change most of the time. Considering that this package already does manual manipulation to generate the relational queries, while yes I would agree it's an emulation only but I would disagree that it's not easily achievable. From a 10k foot view, it would be adding array vs string checks on either side of the relation. Maybe I'm missing something though as you seem confident that it either can't or would take a ton of work to achieve. |
First off, I do know that COBOL is a programming language and not a database, I was simply using cobol as the time reference to just how legacy the system I'm dealing with is. So with that out of the way, I think the point you are talking about are complex clauses like a I would also say that I've been mostly working around this limitation of not allow 2-> 1 relation keys as I proposed, so maybe this is something that's not totally needed, or wanted. "From a 10k foot view", I just meant from a very high level those were the changes I saw as being needed is all. |
maybe related #122 |
I have a condition where I am in need of relating a table with 2 keys that end up relating to another table as one key. I saw there was an old issue about using DB::raw potentially and this might be a great use case for it. Specifically some way of being able to say this composite key when concatenated, relate to this single primary key in another table. Would this be something that this package could cover?
The text was updated successfully, but these errors were encountered: