Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Hibernate CompositeUserType is not working for BLOB type
PostPosted: Wed Feb 22, 2012 7:14 am 

Joined: Wed Feb 22, 2012 7:13 am
Posts: 1
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 ======================================================================='
* 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
projectVO.setAlertCount(projectVO.getAlertCount() + 1);
projectVO.setNotifyCount(projectVO.getNotifyCount() + 1);

<property name="userEventForm" type="com.efycaci.ezone.eventstream.hbm.UserEvent">
<column name="EVENT_DATA" />

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.