Page MenuHomePhabricator

Support anonymous subobjects (easy)
Closed, ResolvedPublic

Description

When more than one subobject is created with the same name on a page only one subobject appears in 'Has subobject' property. When this subobject is browsed however, all different values of properties appear.


Version: unspecified
Severity: enhancement

Details

Reference
bz36634

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:20 AM
bzimport set Reference to bz36634.
bzimport added a subscriber: Unknown Object (MLST).

This is the intended behaviour. The name is an identifier for a subobject of a page. If you use the same name multiple times, then you refer to the same subobject. So you cannot "create more than one subobject of the same name", you can merely add properties to the same subobject in multiple places on a page.

That is a big difference with Semantic Internal Objects and a reason that subobjects cannot be used with multiple-instance templates. I would recommend to be clear about this in the documentation.

Ok, I then make this into a feature request:

#subobject should allow an empty subobject name to be used. In this case, a new name that has not been used yet should be generated for the subobject internally. This allows the creation of "anonymous" subobjects without an explicit name.

This could be done in the same way as for Type:Record values.

The documentation (for the current behaviour) could also be updated independently (feel free to add a remark to the wiki if you find it unclear now).

Unknown Object (User) added a comment.Jul 29 2012, 12:43 PM

The change ([1]) should resolve this bugfix and be generally available with SMW 1.8. For further information, please consult the change description.

[1] https://gerrit.wikimedia.org/r/#/c/16884/