I should have said that I tried: public static void contributeHibernateSessionSource( OrderedConfiguration<HibernateConfigurer> config, final Session session, @InjectService("ApplicationStateManager") final ApplicationStateManager applicationStateManager) { . . . config.add("CustomHibernateConfiguration", new HibernateConfigurer() { public void configure(Configuration configuration) { configuration.setProperty("hibernate.ejb.naming_strategy", "org.hibernate.cfg.DefaultComponentSafeNamingStrategy"); } }); }
Has anyone got embedded entities working with Tapestry / Hibernate with the db column prefix that the DefaultComponentSafeNamingStrategy typically supplies? This is going to cause a real problem for me - would be a shame to have to do OneToOne and a separate lookup for entities with a coincident lifespan. Regards, Jim. -----Original Message----- From: Jim O'Callaghan [mailto:j...@peritussolutions.com] Sent: 29 June 2010 22:04 To: 'Tapestry users' Subject: Tapestry and hibernate DefaultComponentSafeNamingStrategy Is anyone using org.hibernate.cfg.DefaultComponentSafeNamingStrategy with @Embedded entities and Tapestry? I have @EmbeddedIds working fine, with the db data column names prefixed with <variableName_>componentField, but can't seem to get the prefix working @Embedded - I've tried adding: configuration.add("hibernate.ejb.naming_strategy", "org.hibernate.cfg.DefaultComponentSafeNamingStrategy"); ... in the HibernateModule that ships with Tapestry but to no avail. Can anyone give me a steer - hopefully something obvious I'm missing? Thanks, Jim. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org