Current root packages inherit some decisions made long time ago when we started ORIGAM (2004). Most important:
- Some entities have fields mapped as elements in Xml (notably anything deriving from
IOrigamEntity
, notablyAttachment
andBusinessPartner
- User management split between
BusinessPartner
andOrigamUser
entities - Some system tables not having Origam* prefix (e.g.
Attachment
)
The best would be to refactor – change elements to attributes on some entities and remove BusinessPartner
from the internally used tables.
The process can be split to the following phases:
- Getting rid of
BusinessPartner
entity - Element to Attributes migration
- Renaming tables
Getting rid of BusinessPartner entity
We can move BusinessPartner
to an outside package (along with some other unused entities like Organisation
,Resource
or OrigamSync*
entities. This package can still be included by those who depend on it. New projects would not use it. We would also move out IOrigamEntity
so it would not be used by us anymore.
Internally we would change the code to only use OrigamUser
for user management.
IMPORTANT: All
RecordCreatedBy
andRecordUpdatedBy
fields point toBusinessPartner.Id
now. It would have to point toOrigamUser.Id
Element To Attribute Migration
All remaining entities that depend on IOrigamEntity
would be changed to be based on IOrigamEntity2
. Most of them is not expected to be used in XSLTs except of Attachment
.
All transformations on Attachment
entity would have to be checked manually and updated to use attributes instead of elements.
Mail.Sender
and Mail.Recipient
are set to Element for no obvious reason. They should be changed to Attribute, too.
Renaming Tables
We should consider to rename the following tables to Origam*
:
- Attachment
- Counter
- CounterDetail
- Language
The only remaining would be WorkQueue
, which I would leave as is.