Hi, In my DB column has BLOB field. I have to convert my own POJO class from BLOB. Conversion process is BLOB --> java.util.Map ---> POJO.
How to map my own POJO in hbm.xml file
I am facing this problem like
ERROR]22 Feb 2012 13:33 OnTime --> DashBoradDAOImpl:2028 --> getGlobalDashBorad(UserLoginVO) org.hibernate.QueryException: could not resolve property: userEventForm.formType of: com.efycaci.ezone.eventstream.hbm.ViewUserEvents at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44) at org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:59) at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:31) at org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.j =======================================================================' DAOImpl.java =========== /* * Fetch the data from EventData */ Criteria criteria = session.createCriteria(ViewUserEvents.class); criteria.add(Restrictions.in("projectId", alertMap.keySet())); criteria.add(Restrictions.eq("userId", userId)); criteria.add(Restrictions.eq("userEventForm.formType", formType)); List<ViewUserEvents> eventList = criteria.list(); for (ViewUserEvents elanEvent : eventList) { ProjectVO projectVO = alertMap.get(elanEvent.getProjectId()); if (EventStreamDAOImpl.ALERT_COLLS.contains(elanEvent .getUserEventForm().getFormType())) projectVO.setAlertCount(projectVO.getAlertCount() + 1); else projectVO.setNotifyCount(projectVO.getNotifyCount() + 1); }
<hibernate-mapping> <property name="userEventForm" type="com.efycaci.ezone.eventstream.hbm.UserEvent"> <column name="EVENT_DATA" /> </property> </class> </hibernate-mapping>
|