view not found by cayenne

From: Lothar Krenzien (lkrenzie..eb.de)
Date: Thu Oct 06 2005 - 10:39:16 EDT

  • Next message: Joshua Pyle: "Re: view not found by cayenne"

    Hi there,

    I have database with several views int it. No problem for cayenne. But now I defined a new one, changed the DomainMap.xml file and generated the classes. When I try to query the new view I get an error :

             'No DataMap found for query with root: class back.gen.ViewInvertorNativeValues
            at org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:552) '

    Here's my DomainMap.xml (in the Web-INF directory):
            <db-entity name="viewInvertorNativeValues" schema="dbo" catalog="dbSunreader2">
                    <db-attribute name="dataDate" type="TIMESTAMP" isPrimaryKey="true" isMandatory="true" length="23"/>
                    <db-attribute name="dataHour" type="INTEGER" length="10"/>
                    <db-attribute name="energyValue" type="FLOAT" isMandatory="true" length="53"/>
                    <db-attribute name="invertorId" type="INTEGER" isPrimaryKey="true" isMandatory="true" length="10"/>
                    <db-attribute name="powerValue" type="FLOAT" isMandatory="true" length="53"/>
            </db-entity>

            <obj-entity name="ViewInvertorNativeValues" className="ViewInvertorNativeValues" dbEntityName="viewInvertorNativeValues">
                    <obj-attribute name="dataDate" type="java.util.Date" db-attribute-path="dataDate"/>
                    <obj-attribute name="dataHour" type="java.lang.Integer" db-attribute-path="dataHour"/>
                    <obj-attribute name="energyValue" type="java.lang.Float" db-attribute-path="energyValue"/>
                    <obj-attribute name="invertorId" type="java.lang.Integer" db-attribute-path="invertorId"/>
                    <obj-attribute name="powerValue" type="java.lang.Float" db-attribute-path="powerValue"/>
            </obj-entity>

    And the query looks like :

    exprMeasuredData = ExpressionFactory.matchExp("invertorId", Integer.parseInt(invertorId)).andExp(
              ExpressionFactory.matchExp("dataDate", date));

    query = (new SelectQuery(ViewInvertorNativeValues.class, exprMeasuredData));
    query.addOrdering("dataDate", true);

    context.performQuery(query)

    What I'm doing wrong ?
    Thanks, Lothar
    ______________________________________________________________
    Verschicken Sie romantische, coole und witzige Bilder per SMS!
    Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Thu Oct 06 2005 - 10:39:17 EDT