|
From: Jozsa K. <dy...@on...> - 2004-06-02 08:22:08
|
Hi, I'd like to create my database schema with my configured LocalSessionFactoryBean's convenient method createDatabaseSchema(). I configured my LSFB the usual way: <bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"> <property name="dataSource"><ref local="oracleDS"/></property> ... </bean> ..but if I pull that bean 'sessionFactory' from the spring container, it will be a type of net.sf.hibernate.SessionFactoryImpl, the default implementation of the hibernate SessionFactory interface. How could I invoke the method mentioned to create the database schema then? (I can't really see either how the resulting bean could be a total different type than the configured one, but that has minor priority compared to my original question). As a side note, I never really understood why Hibernate doesn't let access the used Configuration from the SessionFactory instance, which could be use to feed SchemaExport and create the schema.. tia, dyn -- .Digital.Yearning.for.Networked.Assassination.and.Xenocide. |