Problems with prefetching of many-to-many relationship-objects

From: Zvonimir Spajic (z.spaji..scensys.de)
Date: Mon Jan 23 2006 - 06:11:15 EST

  • Next message: Tore Halset: "Re: Problems with prefetching of many-to-many relationship-objects"

    Hello,

    is it a problem for cayenne 1.1.3 to prefetch many-to-many
    relationship-objects?

    I get a ClassCastException when I use this:
    ---------------------------------------------------------------
    ProductMedia:Category is an n:m-relationship:

    SelectQuery query = new SelectQuery(ProductMedia.class, qual);
    query.addPrefetch(ProductMedia.HAS_CATEGORY_PROPERTY);

    But I runs fine by 1:m-relationships:
    ---------------------------------------------------------------
    ProductMedia:ProductMediaJpg is an n:m-relationship

    SelectQuery query = new SelectQuery(ProductMedia.class, qual);
    query.addPrefetch(ProductMedia.HAS_PRODUCT_MEDIA_JPG_PROPERTY);

            

    Thanks for help

    Zvonimir



    This archive was generated by hypermail 2.0.0 : Mon Jan 23 2006 - 06:11:25 EST