Hi, Hibernate gurus.
I have actually 2 questions today, and hope to hear from you something that can open my eyes.
1. What is the specific case when we need <map> mapping than <set>? I understand if we cannot change the data model type (which has been existing) and the type is Map, then we should use it. But what else do you think?
2. In most technical documents and references, <map> and <set> mapping examples usually go together with <element> as a sub-entity tag, but very rarely I could see also <one-to-many> tag substituting a <element>. Here it confuses me why I need the tag in fact, since by thinking of Set or Map, it presumes it has a 1 to many relation already. Am I misunderstood? I wonder what will be differences or effects when <one-to-many> is used there. (Very hard to trace the source code for myself.)
I just figure out there might be a difference using 'column' attribute for <element> tag, but what would that mean?
Thanks a lot in advance.
BK
Hibernate version: 2.1.7
|