You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/10/28 17:16:26 UTC

[23/56] [abbrv] ISIS-937: moved TCK out of core.

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
new file mode 100755
index 0000000..4636a53
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
@@ -0,0 +1,50 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/**
+ * 
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * @author Kevin
+ * 
+ */
+public abstract class StringBaseEntity extends AbstractDomainObject {
+
+    public String title() {
+        return stringBase;
+    }
+
+    // {{ String type
+    private String stringBase;
+
+    public String getStringBase() {
+        return stringBase;
+    }
+
+    public void setStringBase(final String string) {
+        this.stringBase = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
new file mode 100755
index 0000000..748997c
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/**
+ * 
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySub extends StringBaseEntity {
+    
+    @Override
+    public String title() {
+        return stringOne;
+    }
+
+    // {{ String type
+    private String stringOne;
+
+    public String getStringClassOne() {
+        return stringOne;
+    }
+
+    public void setStringClassOne(final String string) {
+        this.stringOne = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
new file mode 100755
index 0000000..a208ec2
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/**
+ * 
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySubThree extends StringBaseEntitySubTwo {
+
+    // {{ String type
+    private String string;
+
+    public String getStringClassThree() {
+        return string;
+    }
+
+    public void setStringClassThree(final String string) {
+        this.string = string;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
new file mode 100755
index 0000000..7ffd40b
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
@@ -0,0 +1,48 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+/**
+ * 
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ * 
+ */
+public class StringBaseEntitySubTwo extends StringBaseEntity {
+    
+    @Override
+    public String title() {
+        return stringClassTwo;
+    }
+
+    // {{ String type
+    private String stringClassTwo;
+
+    public String getStringClassTwo() {
+        return stringClassTwo;
+    }
+
+    public void setStringClassTwo(final String string) {
+        this.stringClassTwo = string;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
new file mode 100755
index 0000000..b3f502f
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
@@ -0,0 +1,24 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+public interface Stringable {
+    public String getString();
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
new file mode 100644
index 0000000..a3d2b13
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
@@ -0,0 +1,41 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+
+public class StringableEntityWithOwnDerivedProperty implements Stringable {
+    
+    // {{ String
+    private String string;
+
+    @Override
+    public String getString() {
+        return string;
+    }
+
+    public void setString(final String string) {
+        this.string = string;
+    }
+    // }}
+
+    public String getSpecial() {
+        return "special";
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
new file mode 100755
index 0000000..41a11ea
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
@@ -0,0 +1,71 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+
+public class StringableEntityWithOwnProperties extends AbstractDomainObject implements Stringable, Empty {
+    
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+
+    @Override
+    public String getString() {
+        return string;
+    }
+
+    public void setString(final String string) {
+        this.string = string;
+    }
+
+    // }}
+
+    // {{ Special
+    private String special;
+
+    public String getSpecial() {
+        return special;
+    }
+
+    public void setSpecial(final String special) {
+        this.special = special;
+    }
+
+    // }}
+
+    // {{ Integer
+    private Integer integerValue;
+
+    @MemberOrder(sequence = "1")
+    public Integer getInteger() {
+        return integerValue;
+    }
+
+    public void setInteger(final Integer integerValue) {
+        this.integerValue = integerValue;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
new file mode 100755
index 0000000..460f521
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+public class StringableEntityWithOwnProperty extends AbstractDomainObject implements Stringable {
+
+    public String title() {
+        return string;
+    }
+
+    // {{ String type
+    private String string;
+    @Override
+    public String getString() {
+        return string;
+    }
+    public void setString(final String string) {
+        this.string = string;
+    }
+    // }}
+
+    // {{ Special
+    private String special;
+    public String getSpecial() {
+        return special;
+    }
+    public void setSpecial(final String special) {
+        this.special = special;
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
new file mode 100644
index 0000000..dab2309
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
@@ -0,0 +1,47 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.Aggregated;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.EmbeddedOnly
+@javax.jdo.annotations.Discriminator("AGGR")
+@Aggregated
+@ObjectType("AGGR")
+public class AggregatedEntity extends BaseEntity {
+    
+    // {{ Name
+    private String name;
+
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
new file mode 100644
index 0000000..e54fd4f
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
@@ -0,0 +1,26 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.AbstractContainedObject;
+
+public abstract class BaseEntity extends AbstractContainedObject {
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
new file mode 100644
index 0000000..9a4d524
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
@@ -0,0 +1,94 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDLC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDLC")
+public class BidirWithListChildEntity extends AbstractDomainObject {
+    
+    // {{ Parent (title #1)
+    private BidirWithListParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public BidirWithListParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final BidirWithListParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    // {{ moveTo
+    @MemberOrder(sequence = "1")
+    public BidirWithListChildEntity moveTo(final BidirWithListParentEntity newParent) {
+        if (newParent == getParent()) {
+            // nothing to do
+            return this;
+        }
+        if (getParent() != null) {
+            getParent().removeChild(this);
+        }
+        newParent.getChildren().add(this);
+        this.setParent(newParent);
+        return this;
+    }
+
+    public BidirWithListParentEntity default0MoveTo() {
+        return getParent();
+    }
+
+    public List<BidirWithListParentEntity> choices0MoveTo() {
+        return getContainer().allInstances(BidirWithListParentEntity.class);
+    }
+
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
new file mode 100644
index 0000000..9e28e7d
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
@@ -0,0 +1,99 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDLP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDLP")
+public class BidirWithListParentEntity extends BaseEntity {
+
+    // {{ Name (also title)
+    private String name;
+    
+    @Title
+    @MemberOrder(sequence = "1")
+    @Optional
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+
+    
+    // {{ Children
+    @Persistent(mappedBy="parent")
+    private List<BidirWithListChildEntity> children = new ArrayList<BidirWithListChildEntity>();
+
+    @MemberOrder(sequence = "1")
+    public List<BidirWithListChildEntity> getChildren() {
+        return children;
+    }
+
+    public void setChildren(final List<BidirWithListChildEntity> children) {
+        this.children = children;
+    }
+    // }}
+
+    
+
+    // {{ newChild (action)
+    public BidirWithListChildEntity newChild(final String name) {
+        final BidirWithListChildEntity childEntity = newTransientInstance(BidirWithListChildEntity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+
+    
+    // {{ removeChild (action)
+    public BidirWithListParentEntity removeChild(final BidirWithListChildEntity childEntity) {
+        if (getChildren().contains(childEntity)) {
+            getChildren().remove(childEntity);
+            childEntity.setParent(null);
+        }
+        return this;
+    }
+
+    public List<BidirWithListChildEntity> choices0RemoveChild() {
+        return getChildren();
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
new file mode 100644
index 0000000..a12eeec
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BidirWithListParentEntities")
+@ObjectType("BidirWithListParentEntities")
+@DomainService
+public class BidirWithListParentEntityRepository extends AbstractEntityRepository<BidirWithListParentEntity> {
+
+    public BidirWithListParentEntityRepository() {
+        super(BidirWithListParentEntity.class, "BidirWithListParentEntities");
+    }
+
+    @MemberOrder(sequence = "2")
+    public BidirWithListParentEntity newEntity(final String name) {
+        final BidirWithListParentEntity entity = newTransientInstance(BidirWithListParentEntity.class);
+        entity.setName(name);
+        persist(entity);
+        return entity;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
new file mode 100644
index 0000000..ecac7fe
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
@@ -0,0 +1,93 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDSC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDSC")
+public class BidirWithSetChildEntity extends AbstractDomainObject {
+
+    // {{ Parent (title #1)
+    private BidirWithSetParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public BidirWithSetParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final BidirWithSetParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    // {{ moveTo
+    @MemberOrder(sequence = "1")
+    public BidirWithSetChildEntity moveTo(final BidirWithSetParentEntity newParent) {
+        if (newParent == getParent()) {
+            // nothing to do
+            return this;
+        }
+        if (getParent() != null) {
+            getParent().removeChild(this);
+        }
+        newParent.getChildren().add(this);
+        this.setParent(newParent);
+        return this;
+    }
+
+    public BidirWithSetParentEntity default0MoveTo() {
+        return getParent();
+    }
+
+    public List<BidirWithSetParentEntity> choices0MoveTo() {
+        return getContainer().allInstances(BidirWithSetParentEntity.class);
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
new file mode 100644
index 0000000..f106b39
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
@@ -0,0 +1,100 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDSP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDSP")
+public class BidirWithSetParentEntity extends BaseEntity {
+
+    
+    // {{ Name (also title)
+    private String name;
+    
+    @Title
+    @MemberOrder(sequence = "1")
+    @Optional
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+
+    // {{ Children
+    @Persistent(mappedBy="parent")
+    private Set<BidirWithSetChildEntity> children = new HashSet<BidirWithSetChildEntity>();
+
+    @MemberOrder(sequence = "1")
+    public Set<BidirWithSetChildEntity> getChildren() {
+        return children;
+    }
+
+    public void setChildren(final Set<BidirWithSetChildEntity> children) {
+        this.children = children;
+    }
+    // }}
+
+    
+    // {{ newChild (action)
+    public BidirWithSetChildEntity newChild(final String name) {
+        final BidirWithSetChildEntity childEntity = newTransientInstance(BidirWithSetChildEntity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+
+    
+    // {{ removeChild (action)
+    public BidirWithSetParentEntity removeChild(final BidirWithSetChildEntity childEntity) {
+        if (getChildren().contains(childEntity)) {
+            getChildren().remove(childEntity);
+            childEntity.setParent(null);
+        }
+        return this;
+    }
+
+    public List<BidirWithSetChildEntity> choices0RemoveChild() {
+        return Arrays.asList(getChildren().toArray(new BidirWithSetChildEntity[0]));
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
new file mode 100644
index 0000000..130c27e
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BidirWithSetParentEntities")
+@ObjectType("BidirWithSetParentEntities")
+@DomainService
+public class BidirWithSetParentEntityRepository extends AbstractEntityRepository<BidirWithSetParentEntity> {
+
+    public BidirWithSetParentEntityRepository() {
+        super(BidirWithSetParentEntity.class, "BidirWithSetParentEntities");
+    }
+
+    @MemberOrder(sequence = "2")
+    public BidirWithSetParentEntity newEntity(final String name) {
+        final BidirWithSetParentEntity entity = newTransientInstance(BidirWithSetParentEntity.class);
+        entity.setName(name);
+        persist(entity);
+        return entity;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
new file mode 100644
index 0000000..fb86419
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
@@ -0,0 +1,88 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@ObjectType("CHLD")
+public class ChildEntity extends AbstractDomainObject {
+
+    // {{ Parent (title #1)
+    private ParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public ParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final ParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    // {{ moveTo
+    @MemberOrder(sequence = "1")
+    public ChildEntity moveTo(final ParentEntity newParent) {
+        if (newParent == getParent()) {
+            // nothing to do
+            return this;
+        }
+        if (getParent() != null) {
+            getParent().removeChild(this);
+        }
+        newParent.getChildren().add(this);
+        this.setParent(newParent);
+        return this;
+    }
+
+    public ParentEntity default0MoveTo() {
+        return getParent();
+    }
+
+    public List<ParentEntity> choices0MoveTo() {
+        return getContainer().allInstances(ParentEntity.class);
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
new file mode 100644
index 0000000..6abc29a
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
@@ -0,0 +1,128 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@ObjectType("PRNT")
+public class ParentEntity extends BaseEntity {
+
+    // {{ Name (also title)
+    private String name;
+    
+    @Title
+    @MemberOrder(sequence = "1")
+    @Optional
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    // {{ HomogeneousCollection
+    private List<SimpleEntity> homogeneousCollection = new ArrayList<SimpleEntity>();
+
+    public List<SimpleEntity> getHomogeneousCollection() {
+        return homogeneousCollection;
+    }
+
+    public void setHomogeneousCollection(final List<SimpleEntity> homogenousCollection) {
+        this.homogeneousCollection = homogenousCollection;
+    }
+
+    // }}
+
+    // {{ HeterogeneousCollection
+    private List<BaseEntity> heterogeneousCollection = new ArrayList<BaseEntity>();
+
+    public List<BaseEntity> getHeterogeneousCollection() {
+        return heterogeneousCollection;
+    }
+
+    public void setHeterogeneousCollection(final List<BaseEntity> hetrogenousCollection) {
+        this.heterogeneousCollection = hetrogenousCollection;
+    }
+
+    // }}
+
+    // {{ Children
+    private Set<ChildEntity> children = new HashSet<ChildEntity>();
+
+    @MemberOrder(sequence = "1")
+    public Set<ChildEntity> getChildren() {
+        return children;
+    }
+
+    public void setChildren(final Set<ChildEntity> children) {
+        this.children = children;
+    }
+    // }}
+
+    
+    // {{ NotPersisted
+    @NotPersisted
+    public List<SimpleEntity> getNotPersisted() {
+        throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
+    }
+    // }}
+
+    
+
+    // {{ newChild (action)
+    public ChildEntity newChild(final String name) {
+        final ChildEntity childEntity = newTransientInstance(ChildEntity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+
+    
+    // {{ removeChild (action)
+    public ParentEntity removeChild(final ChildEntity childEntity) {
+        if (getChildren().contains(childEntity)) {
+            getChildren().remove(childEntity);
+            childEntity.setParent(null);
+        }
+        return this;
+    }
+
+    public Set<ChildEntity> choices0RemoveChild() {
+        return getChildren();
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
new file mode 100644
index 0000000..25ef44d
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
@@ -0,0 +1,51 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("ParentEntities")
+@ObjectType("ParentEntities")
+@DomainService
+public class ParentEntityRepository extends AbstractEntityRepository<ParentEntity> {
+
+    public ParentEntityRepository() {
+        super(ParentEntity.class, "ParentEntities");
+    }
+
+    public BaseEntity someAction() { return null; }
+    
+    public SimpleEntity someAction2() { return null; }
+    
+    public ReferencingEntity someAction3() { return null; }
+ 
+    @MemberOrder(sequence = "2")
+    public ParentEntity newEntity(final String name) {
+        final ParentEntity entity = newTransientInstance(ParentEntity.class);
+        entity.setName(name);
+        persist(entity);
+        return entity;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
new file mode 100644
index 0000000..364b693
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
@@ -0,0 +1,96 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCCH")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PCCH")
+public abstract class PolyClassChildEntity extends AbstractDomainObject {
+
+    // {{ Parent (title #1)
+    private PolyClassParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public PolyClassParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final PolyClassParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    // {{ moveTo
+    @MemberOrder(sequence = "1")
+    public PolyClassChildEntity moveTo(final PolyClassParentEntity newParent) {
+        if (newParent == getParent()) {
+            // nothing to do
+            return this;
+        }
+        if (getParent() != null) {
+            getParent().removeChild(this);
+        }
+        newParent.getChildren().add(this);
+        this.setParent(newParent);
+        return this;
+    }
+
+    public PolyClassParentEntity default0MoveTo() {
+        return getParent();
+    }
+
+    public List<PolyClassParentEntity> choices0MoveTo() {
+        return getContainer().allInstances(PolyClassParentEntity.class);
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
new file mode 100644
index 0000000..d8f6594
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
@@ -0,0 +1,125 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCPR")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("PCPR")
+public class PolyClassParentEntity extends BaseEntity {
+
+    
+    // {{ Name (also title)
+    private String name;
+    
+    @Title
+    @MemberOrder(sequence = "1")
+    @Optional
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+
+    // {{ Children
+    @Persistent(mappedBy="parent")
+    private Set<PolyClassChildEntity> children = new HashSet<PolyClassChildEntity>();
+
+    @MemberOrder(sequence = "1")
+    public Set<PolyClassChildEntity> getChildren() {
+        return children;
+    }
+
+    public void setChildren(final Set<PolyClassChildEntity> children) {
+        this.children = children;
+    }
+    // }}
+
+    
+    // {{ newSubtype1 (action)
+    public PolyClassSubtype1Entity newSubtype1(final String name, int foo) {
+        final PolyClassSubtype1Entity childEntity = newTransientInstance(PolyClassSubtype1Entity.class);
+        childEntity.setName(name);
+        childEntity.setFoo(foo);
+        childEntity.setParent(this);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+
+    // {{ newSubtype2 (action)
+    public PolyClassSubtype2Entity newSubtype2(final String name, String bar) {
+        final PolyClassSubtype2Entity childEntity = newTransientInstance(PolyClassSubtype2Entity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        childEntity.setBar(bar);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+    
+    // {{ newSubtype3 (action)
+    public PolyClassSubtype3Entity newSubtype3(final String name, BigDecimal boz) {
+        final PolyClassSubtype3Entity childEntity = newTransientInstance(PolyClassSubtype3Entity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        childEntity.setBoz(boz);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+    
+    // {{ removeChild (action)
+    public PolyClassParentEntity removeChild(final PolyClassChildEntity childEntity) {
+        if (getChildren().contains(childEntity)) {
+            getChildren().remove(childEntity);
+            childEntity.setParent(null);
+        }
+        return this;
+    }
+
+    public List<PolyClassChildEntity> choices0RemoveChild() {
+        return Arrays.asList(getChildren().toArray(new PolyClassChildEntity[0]));
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
new file mode 100644
index 0000000..a358cfd
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PolyClassParentEntities")
+@ObjectType("PolyClassParentEntities")
+@DomainService
+public class PolyClassParentEntityRepository extends AbstractEntityRepository<PolyClassParentEntity> {
+
+    public PolyClassParentEntityRepository() {
+        super(PolyClassParentEntity.class, "PolyClassParentEntities");
+    }
+
+    @MemberOrder(sequence = "2")
+    public PolyClassParentEntity newEntity(final String name) {
+        final PolyClassParentEntity entity = newTransientInstance(PolyClassParentEntity.class);
+        entity.setName(name);
+        persist(entity);
+        return entity;
+    }
+
+    
+    @Hidden
+    public void registerType(PolyClassSubtype1Entity e) { }
+
+    @Hidden
+    public void registerType(PolyClassSubtype2Entity e) { }
+
+    @Hidden
+    public void registerType(PolyClassSubtype3Entity e) { }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
new file mode 100644
index 0000000..91bb8bb
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS1")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PCS1")
+public class PolyClassSubtype1Entity extends PolyClassChildEntity {
+
+
+    
+    // {{ Foo (property)
+    private int foo;
+
+    @MemberOrder(sequence = "1")
+    public int getFoo() {
+        return foo;
+    }
+
+    public void setFoo(final int foo) {
+        this.foo = foo;
+    }
+    // }}
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
new file mode 100644
index 0000000..745f518
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS2")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+@ObjectType("PCS2")
+public class PolyClassSubtype2Entity extends PolyClassChildEntity {
+
+    
+    // {{ Bar (property)
+    private String bar;
+
+    @MemberOrder(sequence = "1")
+    public String getBar() {
+        return bar;
+    }
+
+    public void setBar(final String bar) {
+        this.bar = bar;
+    }
+    // }}
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
new file mode 100644
index 0000000..d6fdfe4
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
@@ -0,0 +1,53 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS3")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+@ObjectType("PCS3")
+public class PolyClassSubtype3Entity extends PolyClassChildEntity {
+
+    
+
+    // {{ Baz (property)
+    private java.math.BigDecimal boz;
+
+    @MemberOrder(sequence = "1")
+    public java.math.BigDecimal getBoz() {
+        return boz;
+    }
+
+    public void setBoz(final java.math.BigDecimal baz) {
+        this.boz = baz;
+    }
+    // }}
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
new file mode 100644
index 0000000..888f5f8
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
@@ -0,0 +1,30 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+
+public interface PolyInterface  {
+
+    public PolyInterfaceParentEntity getParent();
+    public void setParent(PolyInterfaceParentEntity parent);
+
+    public String getName();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
new file mode 100644
index 0000000..c7a258d
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
@@ -0,0 +1,30 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+
+public interface PolyInterfaceIdentityStrategy  {
+
+    public PolyInterfaceIdentityStrategyParentEntity getParent();
+    public void setParent(PolyInterfaceIdentityStrategyParentEntity parent);
+
+    public String getName();
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
new file mode 100644
index 0000000..045b67b
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
@@ -0,0 +1,129 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.Extension;
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Join;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIIP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("PIIP")
+public class PolyInterfaceIdentityStrategyParentEntity extends BaseEntity {
+
+    
+    // {{ Name (also title)
+    private String name;
+    
+    @Title
+    @MemberOrder(sequence = "1")
+    @Optional
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+
+    // {{ Children
+    @Persistent
+    @Join
+    @Extension(vendorName="datanucleus", key="mapping-strategy", value="identity")
+    private Set<PolyInterfaceIdentityStrategy> children = new HashSet<PolyInterfaceIdentityStrategy>();
+
+    @MemberOrder(sequence = "1")
+    public Set<PolyInterfaceIdentityStrategy> getChildren() {
+        return children;
+    }
+
+    public void setChildren(final Set<PolyInterfaceIdentityStrategy> children) {
+        this.children = children;
+    }
+    // }}
+
+    
+    // {{ newSubtype1 (action)
+    public PolyInterfaceIdentityStrategySubtype1Entity newSubtype1(final String name, int foo) {
+        final PolyInterfaceIdentityStrategySubtype1Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype1Entity.class);
+        childEntity.setName(name);
+        childEntity.setFoo(foo);
+        childEntity.setParent(this);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+
+    // {{ newSubtype2 (action)
+    public PolyInterfaceIdentityStrategySubtype2Entity newSubtype2(final String name, String bar) {
+        final PolyInterfaceIdentityStrategySubtype2Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype2Entity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        childEntity.setBar(bar);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+    
+    // {{ newSubtype3 (action)
+    public PolyInterfaceIdentityStrategySubtype3Entity newSubtype3(final String name, BigDecimal boz) {
+        final PolyInterfaceIdentityStrategySubtype3Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype3Entity.class);
+        childEntity.setName(name);
+        childEntity.setParent(this);
+        childEntity.setBoz(boz);
+        this.getChildren().add(childEntity);
+        persistIfNotAlready(childEntity);
+        return childEntity;
+    }
+    // }}
+    
+    // {{ removeChild (action)
+    public PolyInterfaceIdentityStrategyParentEntity removeChild(final PolyInterfaceIdentityStrategy childEntity) {
+        if (getChildren().contains(childEntity)) {
+            getChildren().remove(childEntity);
+            childEntity.setParent(null);
+        }
+        return this;
+    }
+
+    public List<PolyInterfaceIdentityStrategy> choices0RemoveChild() {
+        return Arrays.asList(getChildren().toArray(new PolyInterfaceIdentityStrategy[0]));
+    }
+    // }}
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
new file mode 100644
index 0000000..232f177
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PolyInterfaceIdentityStrategyParentEntities")
+@ObjectType("PolyInterfaceIdentityStrategyParentEntities")
+@DomainService
+public class PolyInterfaceIdentityStrategyParentEntityRepository extends AbstractEntityRepository<PolyInterfaceIdentityStrategyParentEntity> {
+
+    public PolyInterfaceIdentityStrategyParentEntityRepository() {
+        super(PolyInterfaceIdentityStrategyParentEntity.class, "PolyInterfaceIdentityStrategyParentEntities");
+    }
+
+    @MemberOrder(sequence = "2")
+    public PolyInterfaceIdentityStrategyParentEntity newEntity(final String name) {
+        final PolyInterfaceIdentityStrategyParentEntity entity = newTransientInstance(PolyInterfaceIdentityStrategyParentEntity.class);
+        entity.setName(name);
+        persist(entity);
+        return entity;
+    }
+
+    
+    @Hidden
+    public void registerType(PolyInterfaceIdentityStrategySubtype1Entity e) { }
+
+    @Hidden
+    public void registerType(PolyInterfaceIdentityStrategySubtype2Entity e) { }
+
+    @Hidden
+    public void registerType(PolyInterfaceIdentityStrategySubtype3Entity e) { }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
new file mode 100644
index 0000000..461c317
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
@@ -0,0 +1,86 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PII1")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PII1")
+public class PolyInterfaceIdentityStrategySubtype1Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+
+    
+    // {{ Parent (title #1)
+    private PolyInterfaceIdentityStrategyParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public PolyInterfaceIdentityStrategyParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    
+    // {{ Foo (property)
+    private int foo;
+
+    @MemberOrder(sequence = "1")
+    public int getFoo() {
+        return foo;
+    }
+
+    public void setFoo(final int foo) {
+        this.foo = foo;
+    }
+    // }}
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
new file mode 100644
index 0000000..d7bacbd
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
@@ -0,0 +1,86 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PII2")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PII2")
+public class PolyInterfaceIdentityStrategySubtype2Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+    
+    // {{ Parent (title #1)
+    private PolyInterfaceIdentityStrategyParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public PolyInterfaceIdentityStrategyParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    
+    // {{ Bar (property)
+    private String bar;
+
+    @MemberOrder(sequence = "1")
+    public String getBar() {
+        return bar;
+    }
+
+    public void setBar(final String bar) {
+        this.bar = bar;
+    }
+    // }}
+
+
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/21e2882a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
new file mode 100644
index 0000000..c15dc71
--- /dev/null
+++ b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
@@ -0,0 +1,87 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIIS3")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PIIS3")
+public class PolyInterfaceIdentityStrategySubtype3Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+    
+
+    // {{ Parent (title #1)
+    private PolyInterfaceIdentityStrategyParentEntity parent;
+
+    @Title(sequence="1", append="-")
+    @MemberOrder(sequence = "1")
+    @Optional
+    public PolyInterfaceIdentityStrategyParentEntity getParent() {
+        return parent;
+    }
+
+    public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+        this.parent = parent;
+    }
+
+    // }}
+
+    // {{ Name  (title #2)
+    private String name;
+
+    @Title(sequence="2")
+    @MemberOrder(sequence = "1")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    // }}
+
+    
+    // {{ Baz (property)
+    private java.math.BigDecimal boz;
+
+    @MemberOrder(sequence = "1")
+    public java.math.BigDecimal getBoz() {
+        return boz;
+    }
+
+    public void setBoz(final java.math.BigDecimal baz) {
+        this.boz = baz;
+    }
+    // }}
+
+
+
+}