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 LeaderIP 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
ISO 9001:2000, Moody International, TGA (Germany), UKAS(UK), COFRAC(France), CMM Level 4 in process
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. Kindly note that internet communications are not secured, and are therefore susceptible to alteration. IP Devel Romania and its affiliates will not accept legal responsibility for the contents of this message. If you have received this in error, please contact the sender and delete the material from any computer. Thank you for your cooperation.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the originator of the message. This footer also confirms that this e-mail message has been scanned for the presence of computer viruses.
Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of IPdevel .
Scanning of this message and addition of this footer is performed by SurfControl E-mail Filter software in conjunction with virus detection software.
This archive was generated by hypermail 2.0.0 : Thu Oct 21 2004 - 09:42:30 EDT