Re: Model inheritance in different modules

2020-02-03 Thread LBris
The thing is in my app, everything would be done on runtime. The idea is to have a minimal app "base" and once you're on in, you'd have a list of applications that you can install. So If I have "base" and "Employee", and then I want to install "Fleet", only migrations from Fleet would have to be

Re: Model inheritance in different modules

2020-02-03 Thread Steven Mapes
It sounds to me like your data modelling is wrong. You can either have a one-to-one table2 acts as an extension of table1, a view that combines multiple tables into one "virtual table" or have one table and two models that use the table. One, the superset, would be managed, the other would only

Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
Each model represents one table on the DB. Modifying it in two different apps (hence creating two different sets of migrations) might result in breaking changes. What if one migration affects something that is directly referenced by the other app, but wasn't updated? Also, what would the potential

Re: Model inheritance in different modules

2020-01-30 Thread LBris
I do not understand. Could you explain to me what it would break the database and how ? Le jeudi 30 janvier 2020 17:37:22 UTC+1, Abhijeet Viswa a écrit : > > I think this would needlessly complicate the entire migration process. Two > different app migrations (and possibly even more) would have

Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
I think this would needlessly complicate the entire migration process. Two different app migrations (and possibly even more) would have be considered and executed in sequence to prevent anything breaking on the database. On Thu, 30 Jan 2020 at 22:00, LBris wrote: > I've never said it isn't saved

Re: Model inheritance in different modules

2020-01-30 Thread LBris
I've never said it isn't saved in database. It is saved but in the table of the employee since hrfleetemployee inherits from employee. It simply adds this field to the table of Employee Le jeu. 30 janv. 2020 à 5:24 PM, Abhijeet Viswa a écrit : > How would the fields in HRFleetEmployee be persist

Re: Model inheritance in different modules

2020-01-30 Thread Abhijeet Viswa
How would the fields in HRFleetEmployee be persistent and linked to a particular Employee or Vehicle without being saved in the database? Or did I understand your code and request wrong? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributio

Re: Model inheritance in different modules

2020-01-30 Thread LBris
No this is not a django-user-code related post. The code I provided was only an example to illustrate the feature request. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and

Re: Model inheritance in different modules

2020-01-30 Thread Joe Tennies
I think this is more of a django-users comment, so I'll post Adam's template for places. I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django its