[
https://issues.jboss.org/browse/SRAMP-622?page=com.atlassian.jira.plugin....
]
Brett Meyer commented on SRAMP-622:
-----------------------------------
Alright, here's where this landed. Relationship#getOtherAttributes is now persisted.
The following queries are available:
/s-ramp/xsd/XsdDocument[someRelationship[s-ramp:getRelationshipAttribute(.,
'FooKey') = 'FooValue']]
/s-ramp/xsd/XsdDocument[someRelationship[s-ramp:getRelationshipAttribute(.,
'FooKey')]]
/s-ramp/xsd/XsdDocument[someRelationship[s-ramp:getRelationshipAttribute(.,
'InvalidKey')]]
The last 2 essentially create a "hasRelationshipAttribute".
CAVEAT!
Technically, something like the following should be supported:
/s-ramp/xsd/XsdDocument[someRelationship[s-ramp:getRelationshipAttribute(.,
'FooKey') = 'FooValue' and @FooProperty = 'FooValue']]
That would return an XSD with a relationship containing the FooKey attribute *and* the
targeted artifact containing the @FooProperty. Obviously, those would affect 2 different
portions of the eventual query. However, I'm learning how brittle and fragile our
current query builder really is. Under SRAMP-627, I'll be working on using an actual
Builder pattern (and most likely AST objects, provided by ModeShape) that would allow that
type of query.
Until then, getRelationshipAttribute must be used *by itself* in a relationship predicate.
Pairing it with others simply will not work. If others are needed, clients will need to
omit getRelationshipAttribute, then filter using the attribute *in memory*. Hopefully
that's not too limiting in the short-term.
Relationship.getOtherAttributes() should be persisted and queryable
-------------------------------------------------------------------
Key: SRAMP-622
URL:
https://issues.jboss.org/browse/SRAMP-622
Project: S-RAMP
Issue Type: Bug
Components: Persistence
Affects Versions: 0.7.0.Final
Reporter: Lukas Krejci
Assignee: Brett Meyer
Attachments: reproducer.zip
The API allows for the relationships to have arbitrary "other" attributes on
them.
These attributes don't seem to be persisted.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)