thx to Doppelganger !!
i ran into the same problem but using hibernate annotations.
here ist the solution:
1. Import the InetType class
2. annotate the Entityclass with the Typedefinition like this (2nd row is important):
Code:
@Entity
@TypeDef(name="inet", typeClass = InetType.class)
@Table(name = "ipaddresses", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = {"ip", "device_id" }))
public class Ipaddresses extends JavaBeansSupport implements java.io.Serializable { ...
}
3. annotate the the Getter of the column like this (2nd row is important):
Code:
@Column(name = "ip", nullable = false)
@Type(type = "inet")
public String getIp() {
return this.ip;
}
And everything works fine !
I hope anybody help this information.
Moe