Hi,
We are using MapProxyfactory and its methods creates Map & new instance class from interface.
Now when we are using Hibernate save method is it possible to use converted class instance from interface. Or is it possible in ways to convert Map to class instance, which is required by hibernate.
I know the generated class file which hibernate use as 3 methods some thing like this.
public String toString() {
return new ToStringBuilder(this)
.append("acctId", getAcctId())
.toString();
}
public boolean equals(Object other) {
if ( !(other instanceof Account) ) return false;
Account castOther = (Account) other;
return new EqualsBuilder()
.append(this.getAcctId(), castOther.getAcctId())
.isEquals();
}
public int hashCode() {
return new HashCodeBuilder()
.append(getAcctId())
.toHashCode();
}
when I convert interface to class instance I won't see these extra methods and I will be getting exception.
Caused by: net.sf.hibernate.MappingException: No persister for: $Proxy34
at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:345)
Could any one have any idea about this.
Thanks
Srinivas
|