diff --git a/src/main/resources/schema/ClubEvent.hbm.xml b/src/main/resources/schema/ClubEvent.hbm.xml index 94ee2c2..0042fc2 100644 --- a/src/main/resources/schema/ClubEvent.hbm.xml +++ b/src/main/resources/schema/ClubEvent.hbm.xml @@ -19,4 +19,7 @@ + + + diff --git a/src/test/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/dao/ClubEventDaoImplTest.java b/src/test/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/dao/ClubEventDaoImplTest.java index 38bc3ad..d702a61 100644 --- a/src/test/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/dao/ClubEventDaoImplTest.java +++ b/src/test/java/de/kreth/vaadin/clubhelper/vaadinclubhelper/dao/ClubEventDaoImplTest.java @@ -1,10 +1,14 @@ package de.kreth.vaadin.clubhelper.vaadinclubhelper.dao; +import static org.junit.Assert.assertEquals; + import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Date; +import java.util.List; import org.hibernate.Transaction; +import org.hibernate.query.Query; import org.junit.Test; import de.kreth.vaadin.clubhelper.vaadinclubhelper.data.ClubEvent; @@ -40,6 +44,11 @@ public class ClubEventDaoImplTest extends AbstractDatabaseTest { Transaction tx = session.beginTransaction(); session.save(ev); tx.commit(); + + Query query = session.createNamedQuery("ClubEvent.findAll", + ClubEvent.class); + List result = query.list(); + assertEquals(1, result.size()); } private ClubEvent creteEvent() {