extend 2 « Map « JPA Q&A





1. need help in extending IdentityGenerator    forum.hibernate.org

I need to be able to force ID on tables using Identity generator. While I can control the database (set IDENTITY_INSERT ON & OFF in my case on SQLServer), I can't tell hibernate to actually put the ID field in the generated queries. The best solution I can see would be to extend IdentityGenerator and add a verification: is the ID ...

2. Hibernate + ehcache + extended classes: trouble :)    forum.hibernate.org

2008-01-04 14:44:03,039 FATAL [main] hibernate.HibernateUtil (HibernateUtil.java:70) - Creazione iniziale di una SessionFactory Hibernate fallita org.hibernate.MappingException: You may only specify a cache for root mappings at org.hibernate.cfg.Configuration.getRootClassMapping(Configuration.java:1402) at org.hibernate.cfg.Configuration.setCacheConcurrencyStrategy(Configuration.java:1422) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1241) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1217) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184) at org.hibernate.cfg.Configuration.configure(Configuration.java:1112) at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)

3. Hibernate + ehcache + extended classes: trouble :)    forum.hibernate.org

2008-01-04 14:44:03,039 FATAL [main] hibernate.HibernateUtil (HibernateUtil.java:70) - Creazione iniziale di una SessionFactory Hibernate fallita org.hibernate.MappingException: You may only specify a cache for root mappings at org.hibernate.cfg.Configuration.getRootClassMapping(Configuration.java:1402) at org.hibernate.cfg.Configuration.setCacheConcurrencyStrategy(Configuration.java:1422) at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1241) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1217) at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184) at org.hibernate.cfg.Configuration.configure(Configuration.java:1112) at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)

4. Extending a legacy persistent class with multiple mappings    forum.hibernate.org

Just started using Hibernate 3.2. I have a strange requirement (I think!) that I can't seem to be able to solve. I have a legacy application using Hibernate 3.2 that I need to customize. Class "C1" is mapped to Table "T1" and both of them can NOT be modified. Class "C1" is being used by the legacy bussiness layer. So, I ...

5. Best way to deal with ext. updates when using extended ctx?    forum.hibernate.org

What is the best way to deal with a situation where the application is using an extended persistent context but yet there are several writes by an external process? When a transaction completes the documentation says that an extended persistent context becomes detached from the db and reattached during the next unit of work. When the persistent context is reattached a ...

8. These classes referenced by extends were not found    forum.hibernate.org

...

9. Mapping with Inheritance and extended Primary Key ?    forum.hibernate.org

Hi all, I'm completely stuck... I have two classes A and B. A has a composite primary key consisting of p1 and p2 and additional attributes p3 and p4. B extends A, introduces two additional attributes p5 and p6, which p5 should also be an additional key. Because B extends A, at least the fields p3 and p4 will not have ...





10. Extending an entity at runtime    forum.hibernate.org

11. extended session    forum.hibernate.org

Hi, The Hibernate reference recommends extended session over open session in view. This is understandable as it eliminates the need to deal with detached entities. However, how does one keep the extended session available? The reference recommends storing it in an EJB stateful session bean and advice against storing it into the web session. Why? Is it because stateful beans support ...