Hi Bruce

No, I don't think so. If you look at Castor's example, they have:

    <!--  Product has reference to ProductGroup,
          many products may reference same group  -->
    <field name="group" type="myapp.ProductGroup">
      <sql name="group_id" />
      <xml name="group" node="element" />
    </field>

and ProductGroup has id as the identity.

I looked through my code and found one difference. In Castor's example these
steps occur in one transaction:
(1) lookup ProductGroup
(2) assign ProductGroup to Product
(3) create Product

In my code, (1) is done in a separate transaction than (2) and (3). Is this
a problem? Can someone verify this?

Regards
Keith C


> -----Original Message-----
> From: Bruce Snyder [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 20 October 2001 2:14 p.m.
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] help
>
>
> This one time, at band camp, Keith Chew said:
>
> KC >  <!--  Mapping for Role -->
> KC >  <class name="com.jungledrum.be.core.data.vo.RoleVo"
> KC >key-generator="HIGH/LOW" access="shared" identity="id">
> KC >    <map-to table="role_table" xml="role" />
> KC >    <field name="id" type="integer">
> KC >      <sql name="id" type="integer" />
> KC >
> KC >  <!--  Mapping for User -->
> KC >  <class name="com.jungledrum.be.core.data.vo.UserVo"
> KC >key-generator="HIGH/LOW" access="shared" identity="id">
> KC >    <map-to table="user_table" xml="user" />
> KC >    <field name="roleVo" type="com.jungledrum.be.core.data.vo.RoleVo"
> KC >required="true">
> KC >      <sql name="role_id" />
> KC >      <bind-xml name="role-vo" node="element" />
> KC >
> KC >
> KC >It's identical to Castor's Product ProductGroup example. I just cannot
> KC >understand why it cannot fill in the id? Is it because I am
> using int4 in my
> KC >postgresql database? I doubt that's the case.
> KC >
>
> I think that the trouble is the sql name in the User class mapping for
> the field named roleVo. I'm not sure where the role_id came from in
> the sql name, but I believe that this should be pointing to the identity
> of the RoleVo object, in this case it would simply be id. I may be
> wrong here but seem to remember mixing this up before and this was
> my problem.
> --
>
> perl -e 'print
> unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
>
>
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to