relationManyToMany & inheritance
Hi,
I have some problem with ManyToMany relation.
In my DB, a Receipt concerns several Articles and one Article can be in several Receipts.
My DB :
- a table Article
- a table Receipt
- an extra table Receipt_Article
- a table Estimate
- an extra table Estimate_Article
My code :
- a class Article with a Receipts_list
- an abstract class Action with an Articles_list
- a class Receipt derived from Action abstract class
- a class Estimate derived from Action abstract class
Problem :
I can't put my relation in register_class(QxClass<Action> & t) because I don't have the ExtraTable name yet (it can be "Receipt_Article" or "Estimate_Article").
Do I have to have an Articles_list in each Action derived class to implement my relation ?
Thanks
I have some problem with ManyToMany relation.
In my DB, a Receipt concerns several Articles and one Article can be in several Receipts.
My DB :
- a table Article
- a table Receipt
- an extra table Receipt_Article
- a table Estimate
- an extra table Estimate_Article
My code :
- a class Article with a Receipts_list
- an abstract class Action with an Articles_list
- a class Receipt derived from Action abstract class
- a class Estimate derived from Action abstract class
Problem :
I can't put my relation in register_class(QxClass<Action> & t) because I don't have the ExtraTable name yet (it can be "Receipt_Article" or "Estimate_Article").
Do I have to have an Articles_list in each Action derived class to implement my relation ?
Thanks