Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

SpaceDocuments and Type hierarchy


We're looking at using space documents and have a question about the information on this page:


and specifically with the following:

SpaceTypeDescriptor employeeDescriptor = new SpaceTypeDescriptorBuilder( "Child Document Type Name", parentSpaceTypeDescriptor).create();

This is exactly what we'd like to do, but we'd like to do it in XML. Given the API documentation we would expect to be able to add a 'super-type-name' to the os-core:space-type, like this:

<os-core:space id="space" url="/./space" >
  <os-core:space-type type-name="Entity" >
    <os-core:id property="spaceKey"/>
    <os-core:extended-index path="FreshnessDate"/>
  <os-core:space-type type-name="EntityStatic" super-type-name="Entity"/>
  <os-core:space-type type-name="EntityMarket" super-type-name="Entity"/>

but although this property exists in the documentation it's not in the XSD file.

org.xml.sax.SAXParseException : cvc-complex-type.3.2.2: Attribute 'super-type-name' is not allowed to appear in element 'os-core:space-type'.

Do you have any suggestions?

asked 2018-01-16 08:15:12 -0500

jb.ext gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

Hi, We added this request to our backlog meanwhile you can work around by: The workaround for now is:

<bean name="aType" class="org.openspaces.core.config.GigaSpaceDocumentTypeDescriptorFactoryBean"> <property name="typeName" value="A"/> <property name="idProperty"> <bean class="org.openspaces.core.config.SpaceIdProperty"> <property name="propertyName" value="id"></property> <property name="autoGenerate" value="false"></property> </bean> </property> </bean>

<bean name="bType" class="org.openspaces.core.config.GigaSpaceDocumentTypeDescriptorFactoryBean">
    <property name="superType" ref="aType"/>
    <property name="typeName" value="B"/>

<bean id="space" class="org.openspaces.core.space.EmbeddedSpaceFactoryBean">
<property name="name" value="space" />
<property name="spaceTypes" >         
            <ref bean="aType"/>
            <ref bean="bType"/>

answered 2018-01-18 04:21:06 -0500

Ester gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-01-16 08:15:12 -0500

Seen: 36 times

Last updated: Jan 18