From be578c99d102c22d56680410b96aa6ea8e8f5af9 Mon Sep 17 00:00:00 2001 From: Ben Alex Date: Fri, 9 Sep 2005 06:10:13 +0000 Subject: [PATCH] Add setId(Long) back into class, as Hibernate 3.0.5 gives Lazy Initialization Exception if using field="access" when trying to do a getId() on a lazily loaded association. --- .../domain/impl/PersistableEntityLong.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/domain/src/main/java/org/acegisecurity/domain/impl/PersistableEntityLong.java b/domain/src/main/java/org/acegisecurity/domain/impl/PersistableEntityLong.java index 31055eecf9..d8f1e38706 100644 --- a/domain/src/main/java/org/acegisecurity/domain/impl/PersistableEntityLong.java +++ b/domain/src/main/java/org/acegisecurity/domain/impl/PersistableEntityLong.java @@ -30,6 +30,21 @@ public abstract class PersistableEntityLong extends AbstractPersistableEntity { //~ Methods ================================================================ + + /** + * DO NOT USE DIRECTLY. + * + *

+ * Typically only used by the persistence layer, but provided with public + * visibility to not limit flexibility. + *

+ * + * @param id the new instance identity + */ + public void setId(Long id) { + this.id = id; + } + /** * Obtains the persistence identity of this instance. */