How many models for many to many relations |
(02-21-2022, 11:18 AM)MGatner Wrote: I prefer to use one, and then have my Entity use the related model to get its relations. This will be rough bc I am mobile but something like:Found this old thread with Google... Tatter\Relations seems heavy handed for my use case, in which there is only one Entity; which has itself several different relations. I like the approach above, but don't totally understand how to transfer the concept to my application. @MGatner does your pseudocode suggest that we extend all the relation-models involved with methods to support the Entity-level methods which populate the instance attributes? Or keep it all in the Entity's own model and do several DB connections from there to the related tables? My sense is that with the approach you wrote above, we'd keep the Entity population spread over several models, but I wan to know what you'd suggest 2 years later. |
Messages In This Thread |
How many models for many to many relations - by rambco - 02-19-2022, 02:28 AM
RE: How many models for many to many relations - by MGatner - 02-21-2022, 11:18 AM
RE: How many models for many to many relations - by evansharp - 10-22-2024, 07:36 AM
|