Yeah, honestly I was trying to make the existing schema ( legacy )
work using hibernate. Perhaps I am still too new to it, but I could
not figure out how to get the mapping correct without the "child"
table having an identifier. What I did was add an identifier ( using
native ) so that the uniqueness of the child table can be obtained
using it rather than having it be 2 columns from the table. Perhaps
when my skills develop, I can learn how to map improper table
relations ;)...

Thank you all for the response. Perhaps I will try again, but for now
I will use my cheat to make my life easier.

On 12/7/06, Konstantin Priblouda <[EMAIL PROTECTED]> wrote:
> Obviously properties of composite element has to be
> marked in that class instead  of where you placed it
> ( in your case:
> com.wr.adProgram.hibernate.utils.columnViewDetail )
>
>
> I'm not sure though how well composite element is
> suppored in XD1, so I would recommend to upgrade to
> XD2
> ( plugin version 1.0.4-SNAPSHOT )
>
> regards,
>
> --- Mel Haynes <[EMAIL PROTECTED]> wrote:
>
> > I am having a problem getting the composite element
> > feature to work
> > correctly, specifically the property names in the
> > composite element. I
> > have searched the net high and low with now luck.
> > Could someone point
> > out what I am doing wrong? Here is what I have
> >
> > First I have 2 tables, one table stores the name of
> > a custom column
> > layout. The detail table stores the columns and the
> > order for that
> > view.
> >
> > ---------------------------------
> > |        columnView           |
> > ---------------------------------
> > columnViewId  (integer) |
> > programName (char)     |
> > DisplayName   (char)     |
> > user                    (char)     |
> > ---------------------------------
> >
> > ---------------------------------
> > |     columnViewDtl           |
> > ---------------------------------
> > columnViewId(FK)  (integer)   |
> > columnName           (char)       |
> > DisplayName           (char)       |
> > order                          (integer)   |
> > width                           (integer)  |
> > ---------------------------------
> >
> >
> > the columnView can have 0..* columnViewDtl and from
> > reading the
> > hibernate book, I thought choosing a composite
> > element would be the
> > best choice. so i created a regular pojo for
> > columnViewDtl and for
> > columnView I have the following xdoclet tags
> >
> > /**
> >     * @hibernate.set
> >     *     role="columnViewDetails"
> >     *     cascade="all-delete-orphan"
> >     *     table="colviewsdtl"
> >     *     inverse="false"
> >     *     lazy="false"
> >     *
> >     * @hibernate.collection-key column="colViewId"
> >     * @hibernate.collection-composite-element
> >
> class="com.wr.adProgram.hibernate.utils.columnViewDetail"
> >     *
> >     * @hibernate.parent name="columnView"
> >     * @hibernate.property
> >     *     name="columnName"
> >     *     column="columnname"
> >     *     not-null="true"
> >     * @hibernate.property
> >     *     name="displayName"
> >     *     column="displayname"
> >     *     not-null="true"
> >     * @hibernate.property
> >     *     name="order"
> >     *     column="columnOrder"
> >     *     not-null="true"
> >     * @hibernate.property
> >     *     name="width"
> >     *     column="colwidth"
> >     *     not-null="false"
> >     */
> >
> >
> > the problem is in that i am not getting the property
> > names to go into
> > the composite element section.  Here is what I am
> > getting:
> >
> >
> >         <property
> >             name="columnViewDetails"
> >             type="java.util.Collection"
> >             update="true"
> >             insert="true"
> >             column="columnname"
> >             not-null="true"
> >         />
> >
> >         <parent name="columnViewDetails"  />
> >
> >         <set
> >             name="columnViewDetails"
> >             table="colviewsd"
> >             lazy="false"
> >             inverse="false"
> >             cascade="all-delete-orphan"
> >             sort="unsorted"
> >         >
> >
> >             <key column="colViewId"></key>
> >
> >             <composite-element
> >
> >
> class="com.wr.adProgram.hibernate.utils.columnViewDetail"
> >             >
> >
> >             </composite-element>
> >
> >         </set>
> >
> > am i missing something or not writing the tags
> > correctly? I appreciate
> > your time and thanks in advance.
> >
> > --
> > Mel Haynes Jr
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get
> > the chance to share your
> > opinions on IT & business topics through brief
> > surveys - and earn cash
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > xdoclet-user mailing list
> > xdoclet-user@lists.sourceforge.net
> >
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
> >
>
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
> check it out: http://xdoclet.codehaus.org
>
>
>
> ____________________________________________________________________________________
> Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> xdoclet-user mailing list
> xdoclet-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>


-- 
Mel Haynes Jr
e-mail: [EMAIL PROTECTED]
phone: (303)809-1054

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-user mailing list
xdoclet-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to