custom « Component « JPA Q&A

1. hibernate - component mapping vs custom value type

Please tell me what is the difference between component mapping - custom value type and when to use it? Thank you.

2. Is it possible to map Hibernate column to a custom user type?

I have defined a custom user type that works fine when used properties of my entities. For instance:

 <class name="" table="MY_TABLE">
    <property name="foo" type="myCustomUserType">

3. Components or Custom Types

I've been studying the Hibernate reference manual and focusing on Components and Custom Types. I'm trying to figure out when to favor Components over Custom Types. The specific use cases that I'm wondering about are multicolumn value type objects, such as an Address. I've seen references to mapping this kind of situation using both components and custom types. Is it just ...