Replies: 1 comment 1 reply
-
On reflection, I think we should have explicitly forbidden using is_a with attributes. It's intended use are for slots as first-class standalone entities. Attributes are meant to be for simpler self-contained cases. There are gaps in the documentation in what happens in your case and other unusual edge cases such as what happens if you try and inherit from an attribute of a parent class. Having said that, the least surprising behavior would be to use the parent slot's range. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, I have a question regarding slot inheritance when using class attributes.
I'm trying to re-use a slot definition in the context of a class by specifying the parent slot in the attribute's
is_a
, but this doesn't seem to work when using the generators. I know there isslot_usage
, but I'd like to change the slot name. I could define the slot outside of the class, but this would cause name collisions in the schema, which is why I'd prefer to define attributes instead.Is this intended behavior, or should inheritance work when using
is_a
inside class attribute definitions?Example schema:
Example when materialized with
gen-linkml
Beta Was this translation helpful? Give feedback.
All reactions