I am using org.hibernate.cfg.ImprovedNamingStrategy, But for a table I have specified the table name explicitly
@Table(name="EventLog",schema = "eventlogs")
But hibernate seems to be looking for event_log. Shouldn’t explicit naming override the one provided by ImprovedNamingStrategy
It is the behavior of the org.hibernate.cfg.ImprovedNamingStrategy , which will convert the mixed case names to the embedded underscores name . http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/cfg/ImprovedNamingStrategy.html . So if you explicitly use the name “EventLog” , it will convert to the “event_log” .
If you simply want to use the name explicitly specified in the
@Table, you should use the org.hibernate.cfg.DefaultNamingStrategy . By default it is used when you instantiate your org.hibernate.cfg.Configuration object