What's the essential difference between packages and views in the browser?
I dug through this a while back. Here's what I came up with. Use this information at your own risk.
A
regular package is represented by both a
t_package row and a
t_object row. They appear to have the same
ea_guid, but Sparxians have warned us before that that is subject to change without notice. However, the
t_object.PDATA1 column will match
t_package.Package_ID.
A
View package has the same representation in the database, except there is additional information in
t_package.PackageFlags, namely
isModel=1;VICON=n;, where n is 0-5, specifying the view icon shown in the project browser.
A
Root Node is a little different still. It only has a
t_package row, not a corresponding
t_object one. Its
t_package.PackageFlags is set to
isModel=1;, but it has no view icon.
t_package.Parent_ID is 0.
EA prevents you from moving root nodes and views to other levels in the package hierarchy, and from moving a regular package to the root or view levels. You can work around this using the API (by setting
Package.ParentID), but only for moving between the view and package levels, not to/from the root level.
This explains why views, but not root nodes, behave as regular packages in that they can be shown in diagrams and be the source or target of connectors: it's because root nodes are not t_objects, just t_packages, and only t_objects can be can be used that way in the EA data model.
Hope this
confuses you further helps,
/Uffe