Heiner, You didn't tell us which dependency injection framework you you using.
If you're using Spring then simply use the @SpringBean annotation to get a reference to an EntityManager or a Dao. @SpringBean automatically works only for components so you'll also need to add a call to injector to your model's constructor. public class MyModel implements IModel { @SpringBean EntityManager entityManager; public MyModel() { Injector.get().inject(this); } ... } This will take care of instantiating all @SpringBean annotated fields as well are handle their serialization/deserialization. Marios On Thu, May 1, 2014 at 3:42 PM, Yahoo <hansheinrichbr...@yahoo.de> wrote: > I tried the AbstractEntityModel <http://http://wicketinaction. > com/2008/09/building-a-smart-entitymodel/> from Igor Vaynberg but I > didn't get > solved the @Dependency annotation from Vaynbergs salve. > Is there another solution for the Hibernate integration for models. > > Best regards > Heiner > >