Hibernate version: 3.1 - N/A
Mapping documents: That's the help I need
Name and version of the database you are using: Informix 9.x and 10.x
This is a good general question to which I have been unable to find the answer in the forum, the general Hibernate Documentation, or just searching the web.
Informix 9.x onward (and I can only assume other database engines as well) has support for complex, user-defined data types. For example you can create an address data type like this:
create row type my_address_type (
line_1 varchar(50,0),
line_2 varchar(50,0),
city varchar(30,0),
....
);
And this user-defined data type can be included in any table, or such a definition can be 'in-lined' into the table (without a name) and each of the data type's fields is simply accessed through dot notation, c-style constructor notation, etc. like this:
create table person(
address my_address_type,
other_info row(name varchar(50,0), birthdate date, age integer, ...)
...
);
select address.line_1, other_info.name from person where...
insert into person values ( row('1234 Nowhere', 'apt 4', 'Podunk', ...), row('John Smith', '01/01/19xx', 'xx', ...) )...
------------------------------------
These examples are simple, but sufficiently demonstrative for my question. I would like it if I were not told to simply do it a different way - As I said, this is a simplified example.
This question is, by nature, directed at those who already knew that this object-oriented capability existed in contemporary database engines ;), but I would appreciate any help I get. I can find NO method of mapping this in hibernate. It is simple and well documented how to map simple database tables into complex objects, but there is no way I have seen to map complex database tables. Am I missing something? My search on the subject was entirely fruitless. If there is documentation for this capability somewhere, I would be forever grateful for a link. If the capability does not exist, is it in planning? I would prefer to continue to use the hibernate layer and not have to engineer a workaround. Thank you in advance for any relevant suggestions!
_________________ ----------------------------------------------------
Steve ;)
|