[Mulgara-dev] Virtual model in mulgara.

Alex Cozzi alexcozzi at gmail.com
Tue Feb 6 19:08:29 UTC 2007


Thanks Paul, Thanks Andrae,
your explanations have been very helpful.
I had a problem in my test query:

    Answer answer = session.query(
                new Query(selectList, // SELECT
                    new ModelResource(systemModelURI), // FROM
                    new ConstraintConjunction(
                            new ConstraintImpl(new
URIReferenceImpl(resource),
                                    new Variable("p"), new Variable("v"), //
<-- HERE IS THE MISSING PART: new URIReferenceImpl(testModelURI)),
                            new ConstraintImpl(new Variable("s"),
                                    new Variable("p"), new Variable("v"),
                            new URIReferenceImpl(testModelURI)))

                , null, // HAVING
                            Collections
                            .singletonList(new Order(new Variable("s"),
true)), // ORDER
                    // BY
                    null, // LIMIT
                    0, // OFFSET
                    new UnconstrainedAnswer() // GIVEN
                    ));


I was missing the new URIReferenceImpl(testModelURI)) part of the
Constraint, that caused a EmptyResolution to be generated by some other
code, so that the getRowCardinality was never called. Now I am on track to
debug my code. Thanks for the additional suggestions I am slowly wrapping my
brain around this but now I feel I am finally doing progress.

Thanks for your patience.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mulgara.org/pipermail/mulgara-dev/attachments/20070206/18523604/attachment.htm>


More information about the Mulgara-dev mailing list