Brett Meyer commented on Bug HHH-8021

(10:32:27 AM) sebersole: i had a quick look and because of the tight coupling of the notion of Value in the old model code, i dont think the org.hibernate.mapping.Component class supports this at all
(10:32:51 AM) sebersole: Value is assumed to come all from a table
(10:33:00 AM) sebersole: and org.hibernate.mapping.Component extends Value
(10:35:16 AM) sebersole: anyway, my point is that this would require good bit of work for 4.x code
(10:35:44 AM) sebersole: imo you'd need to re-work the org.hibernate.mapping.Component definition
(10:41:31 AM) sebersole: one option might be to add getTable to Column and by default have it look to its value.getTable
(10:41:50 AM) sebersole: but add the ability to override it "locally" to the column
...
(10:50:12 AM) sebersole: you cant know, given a component, that its columns come from different tables
(10:50:36 AM) sebersole: the old model does not support that, and was never changed to support that
(10:51:11 AM) sebersole: one way is a pointer from Column back to Table
(10:51:34 AM) sebersole: but that a new api method
...
(10:54:42 AM) sebersole: tbh, not sure if it is just the nesting that causes this
(10:56:17 AM) sebersole: meaning i think that may just be anecdotal
(10:58:57 AM) emmanuel: sebersole: it's possible as you said that an embeddable cannot have columns form two tables. so the test case could be simplified.
(11:01:36 AM) sebersole: emmanuel: do you know if jpa says one way or another whether embeddables can be split this way?
(11:01:50 AM) sebersole: split across tables i mean
(11:02:22 AM) emmanuel: it does not say so it implies support IMO. But I doubt we will ever see a test in the TCK
(11:02:36 AM) emmanuel: It's one of those legacy mapping that would be nice to have
(11:03:14 AM) sebersole: i agree it would be nice to have
(11:03:35 AM) sebersole: just as it is i dont see a requirement that it be in 4.x
(11:04:45 AM) emmanuel: sebersole: same feeling
(11:04:49 AM) sebersole: adding support for this (at least via column knowing about its table) makes the table structure no longer acyclic
(11:05:10 AM) sebersole: as we'd have pointers both directions
(11:05:30 AM) emmanuel: sebersole: do you have to make a link, after all we have secondary table support alreadya nd it does not require this link
(11:07:42 AM) sebersole: not following what you mean
(11:08:02 AM) sebersole: we do in fact have that in secondary table support
(11:08:28 AM) sebersole: secondary table maps to a class named Join
(11:08:35 AM) sebersole: because hbm called this <join/>
(11:09:06 AM) sebersole: the Join itself carries the join key info
(11:09:36 AM) sebersole: Join always assumes pk joinage
(11:10:37 AM) sebersole: again the problem really is Value
(11:10:58 AM) sebersole: most things you map a Type to do not "span" tables
(11:11:16 AM) sebersole: so Value is currently the value at which table is mapped
(11:11:32 AM) sebersole: so in a way, we do already in fact have this cyclic link
(11:11:43 AM) sebersole: 1) table knows about columns
(11:12:00 AM) sebersole: 2) column knows about value which knows about table
(11:12:24 AM) sebersole: the problem is that Value (here the Component) can only name one table
(11:13:54 AM) sebersole: its a modeling problem (imo) in o.h.mapping with Value
(11:14:11 AM) sebersole: and specifically with all the things that try to be a Value

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira