[hibernate-dev] Clarification of Attribute/Value bindings
steve at hibernate.org
Thu May 19 21:18:54 EDT 2011
Well there are 2 orthogonal distinctions here.
1) Physical versus virtual attributes: some values in the relational
model correspond to attributes physically defined on the domain model,
some do not.
2) Then there is the question of cardinality of the value (one column or
In general combining 2 orthogonal set of options each with 2 options is
going to give you 4 results: combining (A,B) and (Y,Z) is going to
result in [A,Y], [A,Z], [B,Y], [B,Z].
Not sure what you mean by "I'd like to propose only adding true
"Attribute" bindings (including those contained in to
attributeBindingMap)." but that statement scares me. We absolutely need
to be able to track the bindings for virtual attributes.
Also, I do not like the terms "value binding" and "attribute binding",
at all. You are mixing terms from different concepts. It is confusing.
I much prefer AttributeBinding and VirtualAttributeBinding or
something similar that says "this is an attribute binding, but for a
special attribute that does not exist on the domain model".
On 05/19/2011 04:44 PM, Gail Badner wrote:
> In the new metamodel code, it appears that both "Attribute" and "Value" bindings are modelled using AttributeBinding. The places I've seen references to "Value" bindings (EntityIdentifier, Discriminator) don't necessarily have a domain representation.
> I'm working on @IdClass, and this an example where the IdClass itself does not have a representation in the domain model.
> I'd like to make some improvements.
> Steve, (and anyone else interested) please take a look at https://gist.github.com/981804 and let me know if you see anything inherently wrong with my approach, or if you have some suggestions.
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
Steve Ebersole <steve at hibernate.org>
More information about the hibernate-dev