From 334793667e3bb9d5adfff033f27a8e1d40497f4c Mon Sep 17 00:00:00 2001 From: Rob Bygrave Date: Sun, 3 Mar 2024 14:14:23 +1300 Subject: [PATCH] Add deployment error message for ManyToMany with one of the related beans missing an @Id property --- .../io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java index 1c2f3aa9b..423f5415c 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java @@ -379,6 +379,9 @@ public class BeanPropertyAssocMany extends BeanPropertyAssoc implements ST for (ExportedProperty exportedProperty : exportedProperties) { row.addColumn(exportedProperty.getForeignDbColumn()); } + if (importedId == null) { + throw new PersistenceException("Missing @Id property on bean related to ManyToMany " + fullName()); + } importedId.buildImport(row); return row.build(); }