Hi Bryan;
We already have the mappings generated by Middlegen and the pojos generated by
XDoclet.
I was just thinking that since I had the primary key one table embedded in the
fields of a
second table, that I could relate them as objects in the classic "has a"
relation. But it
seems that hibernate wants to have the fields of a dependant object in the same
physical table
whose object defines the dependency.
http://www.hibernate.org/hib_docs/reference/en/html/components.html#components-dependentobjects
I have decideded to just define a new command object bean for my Spring
controller that has
parameters from both middlegen generated pojos. This is the type of stuff I
used to write BMP
EJBs. This way, your bean definitions are not constrained by the schema of one
table and you
can define beans that are composites of multiple tables.
I wonder if you could generate a db view and write hibernate mapping and pojo
files?
Thanks for your replies.
John Olmstead
--- Brian K Bonner <brian.bonner@xxxxxxxxxxxx> wrote:
> John,
>
> Use middlegen to reverse-engineer your legacy db to appropriate mappings
> and objects. Search on middlegen out at the hibernate forum.
>
> Brian
>
> John Olmstead <jolmstead2k@xxxxxxxxx> wrote on 10/13/2004 02:29:34 PM:
>
> > Collegues;
> >
> > I have two objects, call them A and B. Object B has a 4 property
> > composite key whose
> > individual members are also contained in Object A. Object A
> > however, has a different primary
> > key definition than Object B. Since the primay key fields in Object
> > B are contained in Object
> > A, I would like to include Object B as an property of Object A but
> > cannot find a clear way to
> > do this.
> >
> > The Hibernate Literature:
> > http://www.hibernate.org/hib_docs/reference/en/html/components.
> > html#components-dependentobjects
> >
> > discusses dependent objects but states that the parent table would
> > contain the properties of
> > both the Object A and its property Object B. The properties of each
> > of these Objects are in
> > separate tables of a legacy system.
> >
> > I also sifted through the HQL examples in the literature and did not
> > find any thing relevent.
> >
> > Any suggestions on a solution to achieve my objective of including
> > Object B as a property of
> > Object A would be greatly appreciated.
> >
> > Thank You;
> >
> >
> > John Olmstead
> >
> > =====
> > John Olmstead
> > jolmstead2k@xxxxxxxxx
> >
> >
> >
> > _______________________________
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> >
> > ---------
> > You may unsubscribe from this mailing list
> > by sending a blank email addressed to:
> > users-unsubscribe@xxxxxxxxxx
> >
> > --
> > Find additional help by sending a blank email
> > addressed to:
> > users-help@xxxxxxxxxx
> >
>
>
> ---------
> You may unsubscribe from this mailing list
> by sending a blank email addressed to:
> users-unsubscribe@xxxxxxxxxx
>
> --
> Find additional help by sending a blank email
> addressed to:
> users-help@xxxxxxxxxx
>
>
=====
John Olmstead
jolmstead2k@xxxxxxxxx
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
|