Welcome Guest, Not a member yet? Register   Sign In
Model Design Question
#2

Hello IVlike,

This is not an easy task to manage Abstract/Concrete class/table.
I've created an ORM that manages it:
https://github.com/vmoulin78/concorde

Here is an example:
https://github.com/vmoulin78/demo-concorde-postgresql

As you can see on the CDM:
https://github.com/vmoulin78/demo-concor...er/CDM.png
there is an abstract table Person and two concrete tables Author and Commentator

and the code:
https://github.com/vmoulin78/demo-concor...roller.php
Author::find(1); (or Person::find(1); it's the same)
You get an object Author with the Author properties and the Person properties

If you have a question about creating the CDM, the SQL file for the database or about initializing the project, don't hesitate to post it here

Vincent
Reply


Messages In This Thread
Model Design Question - by IVIike - 12-11-2019, 06:16 AM
RE: Model Design Question - by vincent78 - 12-11-2019, 11:37 AM
RE: Model Design Question - by IVIike - 12-13-2019, 03:06 AM
RE: Model Design Question - by MGatner - 12-13-2019, 03:59 PM
RE: Model Design Question - by vincent78 - 12-13-2019, 04:47 PM
RE: Model Design Question - by MGatner - 12-14-2019, 05:34 AM
RE: Model Design Question - by IVIike - 12-16-2019, 12:40 AM
RE: Model Design Question - by MGatner - 12-20-2019, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB