Support for Hibernate naming strategies for code completion/inspections?

Hi everyone,

in a current project we use a Hibernate naming strategy to automatically map the class/attribute names to the table/column names using a specific pattern. For example, all table names start with "t_". So a class name like "MaterialEntry" is automatically converted to the table name "T_MATERIAL_ENTRY" vice versa. This works really nice and helps us to a) stick to the naming guidelines of the customer and b) get rid of many @Column annotations just for defining the column name.

Anyhow, it seems that IDEA does not use the naming strategies for the ORM-specific code completion or mapping inspections. If we use an @Column annotation to define a different column name, no code completion is available for the column name. It seems that no table is associated to the persistent class because IDEA looks for the wrong table name "MATERIAL_ENTRY" and not "T_MATERIAL_ENTRY". Consequently, all column names that are defined using a @Column annotation are marked invalid, too.

Is there any way to make IDEA use the naming strategy to resolve column and table names for code completion/inspection?


Please sign in to leave a comment.