Announcement
Collapse
No announcement yet.
X
-
You can supply framework with your own Hibernate config by setting following properties in your server.properties file:Code:hibernate.config.lookupStyle=factory hibernate.config.className=your.hibernate.config.ProviderFactory
Alius.
Leave a comment:
-
Thanx for reply, but it does not work. The only possibility is to add NamingStrategy programmatically if DataSources don't have such functionality.
I am afraid I will have to generate separate model for my web project or set my sessionFactory with proper config.
Leave a comment:
-
Hi,
Did you specify your naming strategy in hibernate configuration?
Check this property:
Code:hibernate.ejb.naming_strategy
Leave a comment:
-
Thanks for replay but in my case Hibernate needs to know about my NamingStrategy. Let me explain it more specific.
I generate db from model with my NamingStrategy
Code:conf.setNamingStrategy(new ExtNamingStrategy());
OrgUnitODB class as table is org_units (same with class members).
So, my ds.xml is:
Code:<DataSource ID="OrgUnitODB" serverType="hibernate" schemaBean="mypackage.OrgUnitODB" autoDeriveSchema="true" > </DataSource>
But I don't want to set all tables and variables translated names because NamingStrategy should deal with it.
My question is. Can I somewhere specify my NamingStrategy class or such functionality is not supported by SmartGwt?
Leave a comment:
-
There doesn't appear to be any reason that SmartGWT would need to be aware of your NamingStrategy. With the HibernateDataSource, we call Hibernate APIs and do not deal with SQL table or column names directly.
Leave a comment:
-
DataSource Hibernate integration with Naming Strategy
Hello,
I have problem with datasouce integration with Hibernate. I have big project with a lot of hibernate entities. So far we used EJB and DTO to retrive any objects from db. But we decied to use SmartGWT power and to integrate straight with hibernate at some views using autoDeriveSchema.
BUT - our db is generated from model and there is set NamingStrategy. My question is : can I add NamingStrategy to hibernate config or ds.xml so that could SmartGWT handle it?
Or do I have to re-generate model from db to my web project? O mby there is other way to do it quick and simple :)?Tags: None
Leave a comment: