Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #13322 Back to Issue ]
Summary 0013322: Entity subtypes
Revision 2010-05-14 09:41 by alostale
Description A very common pattern in openbravo is subtypes. For example there is a super type of Invoices and two subtypes for it: Sales Invoices and Purchase Invoices.

All subtypes are physically stored in the same table, C_Invoice in this case.

This should be definable in AD. A subtype would be defined as:

-Subtype entity: is the subtype entity. In the example Purchases and Sales.
-Parent type: which would be the parent entity. In the example Invoice.
-Where clause: it is a boolean expression that for each record in the physical table, this clause defines the record subtype. In the example IsSoTrx value would define to which subtype belongs each record.
-Columns: subtypes should also be allowed to define specific columns, which are accessible from other subtypes at the same level, but are present in the super type. This would allow to have subtype specific properties.

With this definition subtypes could be used in different places:
-They would become DAL objects, so they could be instantiated.
-They could be used to define tabs, in this way many of the where clauses that currently tabs have would be unnecessary.
-Navigation window could be defined at this level, solving issues like 0012938
-...
Revision 2010-05-14 09:41 by alostale
Description A very common pattern in openbravo is subtypes. For example there is a super type of Invoices and two subtypes for it: Sales Invoices and Purchase Invoices.

All subtypes are physically stored in the same table, C_Invoice in this case.

This should be definable in AD. A subtype would be defined as:

-Subtype entity: is the subtype entity. In the example Purchases and Sales.
-Parent type: which would be the parent entity. In the example Invoice.
-Where clause: it is a boolean expression that for each record in the physical table, this clause defines the record subtype. In the example IsSoTrx value would define to which subtype belongs each record.
-Columns: subtypes should also be allowed to define specific columns, which are accessible from other subtypes at the same level, but are present in the super type. This would allow to have subtype specific properties.

With this definition subtypes could be used in different places:
-They would become DAL objects, so they could be instantiated.
-They could be used to define tabs, in this way many of the where clauses that currently tabs have would be unnecessary.
-Navigation window could be defined at this level, solving issues like 0013298
-...


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker