Skip to content
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

Support table inheritance #60

Closed
fwgreen opened this issue Aug 11, 2019 · 3 comments
Closed

Support table inheritance #60

fwgreen opened this issue Aug 11, 2019 · 3 comments
Labels
question Further information is requested

Comments

@fwgreen
Copy link
Contributor

fwgreen commented Aug 11, 2019

I'm opening a separate issue from (#46) as it isn't clear to me if the lack of model inheritance precludes having table inheritance as a feature.

Let's say I have a table of galaxies:

+----+------------------------+-------------+
| id |          name          | GALAXY_TYPE |
+----+------------------------+-------------+
|  1 | M100                   | SPIRAL      |
|  2 | Large Magellanic Cloud | IRREGULAR   |
|  3 | M87                    | ELLIPTICAL  |
+----+------------------------+-------------+

Is it possible to implement table inheritance in Fluent without model inheritance?

@tanner0101 tanner0101 added the enhancement New feature or request label Mar 6, 2020
@tanner0101 tanner0101 added question Further information is requested and removed enhancement New feature or request labels Mar 6, 2020
@tanner0101
Copy link
Member

@fwgreen hmm not sure what you mean by this one. Could you elaborate?

@fwgreen
Copy link
Contributor Author

fwgreen commented Mar 6, 2020

@tanner0101 I was hoping for a way to have Single Table Inheritance, similar to JPA or ActiveRecord, by somehow using the ORM to get around the issue of models needing to be final.

@tanner0101
Copy link
Member

Hmm ok. I'm not very familiar with that. As long as the table looks like a normal one to the model everything should work fine. You can use custom SQL commands in the migrations to create whatever type of DB structure you want. If you find something in FluentKit that could be changed or added to make this easier let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants