[hibernate-dev] MetadataSourceProcessor and associations
Gail Badner
gbadner at redhat.com
Wed Jan 23 14:33:17 EST 2013
It seems that JoinColumnResolutionDelegate impls can have the same problem.
----- Original Message -----
> From: "Steve Ebersole" <steven.ebersole at gmail.com>
> To: "Gail Badner" <gbadner at redhat.com>
> Cc: "Hibernate hibernate-dev" <hibernate-dev at lists.jboss.org>
> Sent: Wednesday, January 23, 2013 11:16:23 AM
> Subject: Re: [hibernate-dev] MetadataSourceProcessor and associations
>
> What you mention is in fact possible.
>
> And I have never been very hopeful about the "chasing" approach...
>
>
> On Wed 23 Jan 2013 01:13:48 PM CST, Gail Badner wrote:
> > Is it possible for an entity containing one side of an association
> > be mapped using annotations and the entity containing the opposite
> > side of the association be mapped using an hbm mapping?
> >
> > For example, suppose Order has annotations:
> >
> > @OneToMany( mappedby="order" )
> > List<OrderLine> Order.orderLines
> >
> > OrderLine is mapped using hbm.xml with:
> >
> > <many-to-one name="order"/>
> >
> > If annotations are processed first, then, IIUC, when
> > Order.orderLines is processed, the mapping for OrderLine won't be
> > found (via chasing) because the
> > AnnotationMetadataSourceProcessorImpl does not have the source for
> > the OrderLine mapping. As a result, the OrderLine EntityBinding
> > will not be able to be built until HbmMetadataSourceProcessorImpl
> > is processed.
> >
> > If so, this poses a fundamental problem with entity "chasing" as it
> > is implemented now, since the associated entity would not be
> > processed by the same MetadataSourceProcessor.
> >
> > Am I missing something here?
> >
> > Thanks,
> > Gail
> > _______________________________________________
> > hibernate-dev mailing list
> > hibernate-dev at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
More information about the hibernate-dev
mailing list