[ http://jira.andromda.org/browse/HIB-16?page=comments#action_11351 ]
     
Klaus Schultz commented on HIB-16:
----------------------------------

"Hibernate in Action" stresses the difference between an "entity" (has 
identity) and a "value type" (has no identity, belongs to an entity). This is 
modelling level, not hibernate specific. Fowler uses the term "value object" in 
"Patterns of Enterprise Application Architecture" for the same concept. 
Examples are: Money, Measure, DateRange. 

Hibernate offers two possibilites to map that to the table of the entity: 
"component" (what an overloaded term) and using a Usertype. It would be fine to 
support at least one. 
I would write the andromda code in the hibernate cartridge, if nobody has 
started yet.

I think tagging of UML composition is not the elegant solution, as a typical 
way to model that is a "normal" attribute like "price: MonetaryAmount" (look at 
the image, taken of the auction example of "Hibernate in Action", taken not 
from the book but from the internet site). A stereotype would be better, since 
MonetaryAmount will always be used this way. This class shouldn't have any 
associations except a composition pointing to it.

How to name the stereotype? 
- "value type" [HiA] or "value object" [Fowler] may be confusing, since "value 
object" is something complete different in AndroMDA and "Core J2EE patterns"
- "datatype" is a possibility, but may be ambigous
- "embedded object" is a term of Poet, of JDO (JDO tags the attribute in the 
owner class), and also of [Fowler], he uses the term to denote this mapping 
strategy.

What' your opinion?


> Component Support
> -----------------
>
>          Key: HIB-16
>          URL: http://jira.andromda.org/browse/HIB-16
>      Project: Hibernate Cartridge
>         Type: New Feature
>     Reporter: Davin Coleman
>     Assignee: Chad Brandon

>
> The Hibernate cartridge should support Hibernate components. I propose that 
> an association marked as composition should identify the component.
> The component attributes should be persisted within the same table as the 
> containing element.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.andromda.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to