How to ignore columns class fields in Hibernate Missing column: in databasetable


Caused by: org.hibernate.HibernateException: Missing column: test in databasetable
at org.hibernate.mapping.Table.validateColumns(
at org.hibernate.cfg.Configuration.validateSchema(
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(
at org.hibernate.impl.SessionFactoryImpl.<init>(
at org.hibernate.cfg.Configuration.buildSessionFactory(
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
… 61 more

Solution is adding @Transient to column like as below;

private String test;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s