Hi,
I am working on a RESTEasy Web services project using hibernate JPA. My project name is filterservice. TblMasterdata is the JPA entity name which is also existing in my database. TblMasterdata structure in database is: ID bigint(20) CodeId bigint(20) Code varchar(100) Value varchar(100) ComponentVisibleType varchar(100) Description1 varchar(100) Description2 varchar(100)
Now if i use some fields like CodeId in TblMasterdata entity and run filterservice, I get the following error in logs: org.hibernate.HibernateException: Missing column: code_id in fedmine_dev.tbl_masterdata_6_jan_2012 at org.hibernate.mapping.Table.validateColumns(Table.java:275) at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1271) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:498) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1740) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
So here i am not getting, when CodeId is existing in database, why it is showing as missing column in logs.
Thanks Sumit Tomar
|