Spring SessionFactory Vs hibernate SessionFactory
Hi i am using latest EAP release of Intellij 7 and have NOT found a way to map my sessionFactory in my spring context to datasource successfully to the degree my resources can auto complete table and column names. It shows there is a session factory in the hibernate facet and attached to my data source - maybe the way the spring context lists the resource mappings does not allow the hbm files to see the data source. Is there any way to override or attach a datasource to my hibernate mapping files. Using the hibernate.cfg file seems to work.
regards
Zahid
Please sign in to leave a comment.
Hello Zahid,
I have the following spring configuration for testing purposes:
org.hibernate.dialect.DerbyDialect org.hibernate.transaction.JDBCTransactionFactory validate thread classpath:map/hbm/Prepared.hbm.xml ]]>
With this session factory sfModQ appears in Hibernate facet settings, and
I can map a data source. So, completion and highlighting work in my Prepared.hbm.xml.
Does similar configuration work for you?
A factory from hibernate.cfg.xml is also shown in the same facet settings.
There is no problem to have both ones defined.
Alexander.
hi Alexander,
thank you for your reply.
Your configuration helped the only difference with mine was i was using mappingResources over mappingLocations. As i use maven i place my hbm files in a different location. But im sure i will be able to map to resources directory somehow.
thanks again
Z