Re: BUG #CAY-194 closed?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Oct 21 2004 - 10:56:29 EDT

  • Next message: Jorge Sopena: "Re: Weird Behaviour with Nullify rule"

    Hi Adrian,

    I saw your comments on CAY-194. Even though it is closed, all the comments
    are emailed to whomever it was originally assigned (me in this case). I
    will take a look at it soon. Also could you post the exception stack trace
    (or is this just that select query retruns zero rows)?

    Thanks
    Andrus

    > Hi,
    >
    > I have three classes "Content", "ContentType1" that extends ContentType
    > and "ContentType2" that extends "ContentType".
    >
    > Also each Content has a parent which is also a Content.
    >
    > After I execute the code
    >
    > DataContext context = DataContext.createDataContext();
    > Content c =
    > (Content)context.createAndRegisterNewObject("ContentType1");
    > c.setName("parent");
    >
    > Content c1 =
    > (Content)context.createAndRegisterNewObject("ContentType2");
    >
    > c1.setName("child1");
    > c1.setParent(c);
    > Content c2 =
    > (Content)context.createAndRegisterNewObject("ContentType2");
    >
    > c2.setName("child2");
    > c2.setParent(c);
    > Content c3 =
    > (Content)context.createAndRegisterNewObject("ContentType2");
    >
    > c3.setName("child3");
    > c3.setParent(c2);
    > context.commitChanges();
    >
    > I tried to run a query like that.
    >
    > context = DataContext.createDataContext();
    >
    >
    > Expression qualifier =
    > ExpressionFactory.matchExp("parent", c3);
    > Content acontent = (Content)context.performQuery(new
    > SelectQuery(Content.class, qualifier)).get(0);
    >
    > The isssue I have is that after that last statement I get a
    > NullPointerException.
    >
    > Some time ago I reported CAY-194 bug and this behavior seems similar
    > with the one described at that time. I added a log file and the mapping
    > file as comments to this bug.
    >
    > I run with Cayenne1.1RC1.
    >
    > --
    > Adrian Popa
    > Team Leader
    >
    > IP Devel
    > 1D Vasile Milea Blvd.
    > 6 Bucharest, Romania
    > http://www.ipdevel.net
    > tel: + 40 21 212 70 20
    > fax: + 40 21 212 70 30
    > mobile: + 40 724 567 496
    >
    >



    This archive was generated by hypermail 2.0.0 : Thu Oct 21 2004 - 10:56:31 EDT