-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate CompositeUserType is not working for BLOB type
PostPosted: Wed Feb 22, 2012 7:14 am 
Newbie

Joined: Wed Feb 22, 2012 7:13 am
Posts: 1
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 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.