diff --git a/src/test/java/org/tests/cache/TestBeanCacheContactLazyLoad.java b/src/test/java/org/tests/cache/TestBeanCacheContactLazyLoad.java
new file mode 100644
index 000000000..9eb438032
--- /dev/null
+++ b/src/test/java/org/tests/cache/TestBeanCacheContactLazyLoad.java
@@ -0,0 +1,68 @@
+package org.tests.cache;
+
+import io.ebean.BaseTestCase;
+import io.ebean.DB;
+import io.ebeantest.LoggedSql;
+import org.junit.Test;
+import org.tests.model.basic.Contact;
+import org.tests.model.basic.Customer;
+
+import java.sql.Date;
+import java.time.LocalDate;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Test class testing a wrong behaviour of the bean cache.
+ */
+public class TestBeanCacheContactLazyLoad extends BaseTestCase {
+
+ /**
+ * This test shows a wrong behaviour of the bean cache up to at least Ebean 12.4.*:
+ *
+ * - bean partially fetched via natural key, filling the cache
+ * - bean modified using a setter
+ * - getter called on non-loaded property to trigger lazy load
+ * - bean fetched again using the same natural key, to hit cache
+ * - it is expected, that the fetched bean does not contain the modification from before
+ *
+ */
+ @Test
+ public void testBeanCacheWithLazyLoading() {
+ final Customer customer = new Customer();
+ customer.setName("Customer");
+ customer.setAnniversary(Date.valueOf(LocalDate.of(2010, 1, 1)));
+ DB.save(customer);
+
+ final Contact contact = new Contact();
+ contact.setFirstName("Tim");
+ contact.setLastName("Button");
+ contact.setPhone("1234567890");
+ contact.setMobile("4567890123");
+ contact.setEmail("tim@button.com");
+ contact.setCustomer(customer);
+
+ DB.save(contact);
+
+ // Only get two properties, so we have to lazy-load later
+ final Contact contactDb = DB.find(Contact.class).where().eq("email", "tim@button.com").select("email,lastName").findOne();
+ assertThat(contactDb).isNotNull();
+ LoggedSql.start();
+ contactDb.setLastName("Buttonnnn");
+ List sql = LoggedSql.collect();
+ assertThat(sql).isEmpty(); // setter did not trigger lazy load
+
+ // trigger lazy load
+ assertThat(contactDb.getPhone()).isEqualTo("1234567890");
+ sql = LoggedSql.collect();
+ assertThat(sql).isNotEmpty(); // Lazy-load took place
+
+ final Contact contactDb2 = DB.find(Contact.class).where().eq("email", "tim@button.com").select("email,lastName").findOne();
+ sql = LoggedSql.stop();
+ assertThat(sql).isEmpty(); // We expect that the bean was loaded from cache
+ assertThat(contactDb2).isNotNull();
+ assertThat(contactDb2.getLastName()).isEqualTo("Button");
+ }
+
+}