You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/06/10 18:20:58 UTC
(causeway) branch CAUSEWAY-4034 updated: CAUSEWAY-4034: adds guard to avoid duplicate synthetic actions being created
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch CAUSEWAY-4034
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/CAUSEWAY-4034 by this push:
new 6878cc51b16 CAUSEWAY-4034: adds guard to avoid duplicate synthetic actions being created
6878cc51b16 is described below
commit 6878cc51b160ac82255c55c2a0e379deed745ac0
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jun 10 19:20:50 2026 +0100
CAUSEWAY-4034: adds guard to avoid duplicate synthetic actions being created
---
.../specloader/specimpl/ObjectSpecificationAbstract.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
index 6264e7e1336..507ba352e4e 100644
--- a/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/causeway/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
@@ -1068,6 +1068,10 @@ public static Stream<ObjectAction> createFor(
private static boolean isEligible(
final ObjectSpecification parentSpec,
final OneToManyAssociation collection) {
+ if(parentSpec != collection.getDeclaringType()) {
+ // avoid installing for subclasses
+ return false;
+ }
if (collection.getElementType() == null) {
return false;
}
@@ -1236,6 +1240,10 @@ public static Stream<ObjectAction> createFor(
private static boolean isEligible(
final ObjectSpecification ownerSpec,
final OneToOneAssociation reference) {
+ if(ownerSpec != reference.getDeclaringType()) {
+ // avoid installing for subclasses
+ return false;
+ }
val referencedType = reference.getElementType();
if (referencedType == null) {
return false;