views:

25

answers:

1

I have IntelliJ IDEA 8.1.3.

It has support for a hibernate facet/plugin which I have enabled. When I do this it recognises the HQL query strings but highlights in red all the objects and properties. I can't see how to get IDEA to be aware of my entities.

I use spring+hibernate and annotated objects. I have no hibernate.cfg.xml just a spring bean using AnnotationSessionFactoryBean.

Does anyone know how I can get this to work? Does the standard IntelliJ support this?

A: 

You simply need to configure the datasource for your application. Usually to get this done you can directly access the auto-correction menu (alt + enter) and it will ask you to associate a datasource to your hibernate facet.

Colin Hebert
I don't really have a fixed datasource as I test with different DBs. All I want is for IDEA to parse my annotated hibernate objects and be able to check my HQL using that info.
Mike Q