我说的是T5,Java1.7。
我找不到关于在Tapestry服务中使用hibernate的任何详细教程。我需要的是创建能够独立处理hibernate的Tapestry服务。问题是,如何正确地将它与Hibernate绑定?应该注入Hibernate的哪个对象以便在此服务中进一步工作?当前的方法是在这个服务中注入一个HibernateSessionSource对象(通过服务的构造函数传递它的实例),然后手动创建会话,开始事务等等。synchronized void del
Hibernate假设所有对象成员都来自它负责的SQL数据库。如果一个对象的某些字段不是来自SQL,例如,数据源是另一个NoSQL数据库或只是文件。//b object is in an self defined cache which the int id; }
因此,如果我将@Embeddable添加到B,让
但是,当我使用session.get()时,也同样有效。return (Employee)session.load(Employee.class, id); doesn't work at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862)
at org.hibernate.impl.SessionImp