Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 2.2 M1
-
Fix Version/s: None
-
Component/s: Build, Infrastructure and Tests
-
Labels:
-
keywords:model
-
Tests:Unit
-
Difficulty:Unknown
-
Documentation:N/A
-
Documentation in Release Notes:N/A
-
Similar issues:
XWIKI-8182 Entity Reference serializers should fail if the passed reference is invalid XWIKI-7500 When serialized with local serializer Object reference is not that local XWIKI-5002Implement Explicit Reference Resolver and Serializer XWIKI-6654Multiple backslash are not properly handled in reference resolvers and serializers XWIKI-8001ModelScriptService does not have a method to serialize with parameters XWIKI-5003Add optional parameter support for Reference Resolvers and Serializers XWIKI-4899Add Model API to get default Entity Reference values XWIKI-4929XWikiDocument#getParent and setParent does not serialize/resolve the reference based on the document but on the current context XWIKI-4775Introduce object and property references in the new model module XWIKI-7601Take into account generic type in reference resolvers and serializer components
Description
For example, for a reference like the one resolved from
xwiki:Space.Page
doing a
serializer.serialize(reference.extractReference(EntityType.SPACE))
will result in
xwiki:Space.Page
instead of
xwiki:Space
Probably fixed by some other issue.
I see we have the following test:
@Test public void testSerializeRelativeReference() { EntityReference reference = new EntityReference("page", EntityType.DOCUMENT); Assert.assertEquals("page", serializer.serialize(reference)); reference = new EntityReference("page", EntityType.DOCUMENT, new EntityReference("space", EntityType.SPACE)); Assert.assertEquals("space.page", serializer.serialize(reference)); }This test as added on 3/11/2010, in commit "Ensure that the reference serializer can serialize relative references git-svn-id: https://svn.xwiki.org/svnroot/xwiki/platform/core/trunk@27577 f329d543-caf0-0310-9063-dda96c69346f"