aba228f443
AttributesSql enumerated only the dynamic_attribute table (user-configured attributes), so engine/platform objects came back with zero attributes and extension sub-attributes (TestAlarm001.Acked, .AckMsg, ...) were missing. DiscoverHierarchy diverged badly from what System Platform's Object Viewer shows. AttributesSql now UNIONs dynamic_attribute with the built-in attributes every object inherits from its primitives (attribute_definition joined via primitive_instance). Built-in rows carry no category filter (the attribute_definition category numbering differs from dynamic_attribute's) and are never flagged is_historized/is_alarm, since those flags identify a configured attribute that anchors an extension, not the extension's leaves. dynamic_attribute wins on a reference collision. This raises the attribute surface ~7x (verified 2,026 -> 14,334 against the ZB database). AttributesSql no longer matches the OtOpcUa original; HierarchySql still does. Column shape, ordinals, proto, and generated code are unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>