Return-Path: X-Original-To: apmail-isis-users-archive@www.apache.org Delivered-To: apmail-isis-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40951106A7 for ; Wed, 26 Feb 2014 15:06:12 +0000 (UTC) Received: (qmail 44269 invoked by uid 500); 26 Feb 2014 15:06:11 -0000 Delivered-To: apmail-isis-users-archive@isis.apache.org Received: (qmail 44168 invoked by uid 500); 26 Feb 2014 15:06:10 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 44150 invoked by uid 99); 26 Feb 2014 15:06:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Feb 2014 15:06:08 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of okwuiagada@gmail.com designates 209.85.213.44 as permitted sender) Received: from [209.85.213.44] (HELO mail-yh0-f44.google.com) (209.85.213.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Feb 2014 15:05:59 +0000 Received: by mail-yh0-f44.google.com with SMTP id f73so1061064yha.31 for ; Wed, 26 Feb 2014 07:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5jaZk/ZE2mgjl/RkONRS65aGqqo8WgeCBjlGsWmzFAQ=; b=0mwenI8NYvfVk4dKEH934Szs02AxuvN0DFDn1g4+RDz2NU9JJU8CijsIt+lkotkD+X /FycRm3nBeZc2vErJfyBCU6cd6skIiC+4McikQpJfr4lRaZawUNWgrOqMv+S03/ePYhx GUb8RgQz0qHS8XLzjck5vJ06DUoLL6A4+WHeza49UsA+Jy1dZeOi5qAJrHpuoOhS/AJG XjGMjYi/061Qlu5iCI1JNBn8LNoSehBvve2sBbYjNqnYPA5R2dxCwx4aN2o2JJrcupbq Tme8iU1PszssLWnH+Qd6O6O/3BJIlHnoSM6fwo0oxHrF2fH8AUVZNrYfb1vPn414e+wg QXJw== MIME-Version: 1.0 X-Received: by 10.236.159.65 with SMTP id r41mr8320581yhk.20.1393427138444; Wed, 26 Feb 2014 07:05:38 -0800 (PST) Received: by 10.170.218.132 with HTTP; Wed, 26 Feb 2014 07:05:38 -0800 (PST) In-Reply-To: References: Date: Wed, 26 Feb 2014 16:05:38 +0100 Message-ID: Subject: Re: what could be causing this kind of error From: james agada To: "users@isis.apache.org" Content-Type: multipart/alternative; boundary=20cf303f6b389b814404f350896e X-Virus-Checked: Checked by ClamAV on apache.org --20cf303f6b389b814404f350896e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Oops. Fixed the missing comma but the error is still there in a different way integration.tests.actions.ToDoItemTest_completed Time elapsed: 0 sec <<< > ERROR! > > java.lang.RuntimeException: > org.datanucleus.exceptions.NucleusDataStoreException: An exception was > thrown while adding/validating class(es) : user lacks privilege or object > not found: fromParty > > java.sql.SQLSyntaxErrorException: user lacks privilege or object not > found: fromParty > > > On Wed, Feb 26, 2014 at 3:31 PM, Dan Haywood wrote: > You are still missing the comma before "fromParty" field in the SELECT > clause. > > @Extension(vendorName =3D "datanucleus", key =3D "view-definition= ", > > value =3D "CREATE VIEW \"DailySalesTotalForParty\" " + > > "( " + > > " {this.transactionDate}, " + > > " {this.totalAmount} " + <<<<<<<<<<<<<< > HERE <<<<<<<<<<<<< > > " {this.fromParty} " + > > ") AS " + > > > > > On 26 February 2014 14:20, james agada wrote: > > > This is my class - cleaned up > > > > /* > > > > * Licensed to the Apache Software Foundation (ASF) under one > > > > * or more contributor license agreements. See the NOTICE file > > > > * distributed with this work for additional information > > > > * regarding copyright ownership. The ASF licenses this file > > > > * to you under the Apache License, Version 2.0 (the > > > > * "License"); you may not use this file except in compliance > > > > * with the License. You may obtain a copy of the License at > > > > * > > > > * http://www.apache.org/licenses/LICENSE-2.0 > > > > * > > > > * Unless required by applicable law or agreed to in writing, > > > > * software distributed under the License is distributed on an > > > > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > > > > * KIND, either express or implied. See the License for the > > > > * specific language governing permissions and limitations > > > > * under the License. > > > > */ > > > > > > package dom.todo; > > > > > > import java.math.BigDecimal; > > > > import java.util.List; > > > > > > import javax.jdo.annotations.Extension; > > > > import javax.jdo.annotations.IdentityType; > > > > import javax.jdo.annotations.InheritanceStrategy; > > > > > > import org.joda.time.LocalDate; > > > > > > import org.apache.isis.applib.AbstractViewModel; > > > > import org.apache.isis.applib.annotation.Bookmarkable; > > > > import org.apache.isis.applib.annotation.DescribedAs; > > > > import org.apache.isis.applib.annotation.Hidden; > > > > import org.apache.isis.applib.annotation.Immutable; > > > > import org.apache.isis.applib.annotation.Optional; > > > > import org.apache.isis.applib.annotation.Render; > > > > import org.apache.isis.applib.annotation.Render.Type; > > > > import org.apache.isis.applib.annotation.Title; > > > > > > > > > > @javax.jdo.annotations.PersistenceCapable( > > > > identityType =3D IdentityType.NONDURABLE, > > > > table =3D "DailySalesTotalForParty", > > > > extensions =3D { > > > > @Extension(vendorName =3D "datanucleus", key =3D "view-definiti= on", > > > > value =3D "CREATE VIEW \"DailySalesTotalForParty\" " + > > > > "( " + > > > > " {this.transactionDate}, " + > > > > " {this.totalAmount} " + > > > > " {this.fromParty} " + > > > > ") AS " + > > > > "SELECT " + > > > > " \"Transaction\".\"transactionDate\" , " + > > > > > > " SUM(\"Transaction\".\"faceValue\") AS > > \"totalAmount\" ," + > > > > " \"Transaction\".\"fromParty\" " + > > > > " FROM " + > > > > " \"Transaction\" " + > > > > "GROUP BY " + > > > > " \"transactionDate\", " + > > > > " \"fromParty\" " + > > > > "ORDER BY " + > > > > " \"transactionDate\" ") > > > > }) > > > > @javax.jdo.annotations.Inheritance(strategy =3D > > InheritanceStrategy.NEW_TABLE) > > > > @javax.jdo.annotations.Queries( { > > > > @javax.jdo.annotations.Query( > > > > name=3D"DailySalesForParty", language=3D"JDOQL", > > > > value=3D"SELECT FROM dom.todo.DailySalesTotalForParty WHERE fromParty = =3D=3D > > :party ") > > > > }) > > > > @Bookmarkable > > > > @Immutable > > > > public class DailySalesTotalForParty { > > > > > > // ////////////////////////////////////// > > > > /** > > > > @javax.jdo.annotations.Column(allowsNull =3D "false") > > > > private String fromParty; > > > > > > /** > > > > * Lazily loaded from the {@link #getReference() reference}, provid= es > > access > > > > * to the underlying {@link Property}. > > > > @Optional > > > > @Title(sequence =3D "1") > > > > public String getFromParty() { > > > > return fromParty; > > > > } > > > > > > public void setFromParty(final String party) { > > > > this.fromParty =3D party; > > > > } > > > > */ > > > > // ////////////////////////////////////// > > > > private java.math.BigInteger fromParty; > > > > @Optional > > > > public java.math.BigInteger getFromParty(){ > > > > return this.fromParty; > > > > } > > > > public void setFromParty_Party_ID_OID(java.math.BigInteger id ){ > > > > this.fromParty =3Did; > > > > } > > > > > > ////////////////////////////////////// > > > > private LocalDate transactionDate; > > > > > > @Title(sequence =3D "2", prepend =3D " - ") > > > > public LocalDate getTransactionDate() { > > > > return transactionDate; > > > > } > > > > > > public void setTransactionDate(final LocalDate dueDate) { > > > > this.transactionDate =3D dueDate; > > > > } > > > > > > // ////////////////////////////////////// > > > > > > private BigDecimal totalAmount; > > > > > > public BigDecimal getTotalAmount() { > > > > return totalAmount; > > > > } > > > > > > public void setTotalAmount(final BigDecimal total) { > > > > this.totalAmount =3D total; > > > > } > > > > > > > > > > // ////////////////////////////////////// > > > > > > /** @Render(Type.EAGERLY) > > > > public List getTransactions() { > > > > return transactions.findTransactionForPartyOnDate(getFromParty(), > > getTransactionDate()); > > > > } > > > > */ > > > > // ////////////////////////////////////// > > > > > > private Partytypes partytypes; > > > > > > final public void injectPartytypes(final Partytypes partytypes) { > > > > this.partytypes =3D partytypes; > > > > } > > > > > > private Transactions transactions; > > > > > > final public void injectTransactions(final Transactions transaction= s) > > { > > > > this.transactions =3D transactions; > > > > } > > > > > > } > > > > > > This is the error > > > > > > 15:34:03,784 [Schema main DEBUG] CREATE VIEW > >> "DailySalesTotalForParty" ( "transactionDate", "totalAmount" > >> "fromParty" ) AS SELECT "Transaction"."transactionDate" , > >> SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty" FROM "Transaction" GROUP BY > >> "transactionDate", "fromParty" ORDER BY "transactionDate" > >> > >> 15:34:03,790 [Datastore main ERROR] Error thrown > >> executing CREATE VIEW "DailySalesTotalForParty" ( "transactionDate", > >> "totalAmount" "fromParty" ) AS SELECT > "Transaction"."transactionDate" > >> , SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty" FROM "Transaction" GROUP BY > >> "transactionDate", "fromParty" ORDER BY "transactionDate" : > unexpected > >> token: fromParty required: ) > >> > >> java.sql.SQLSyntaxErrorException: unexpected token: fromParty required= : > ) > >> > >> at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > >> > >> at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > >> > >> at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) > >> > >> at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) > >> > >> > > SQL seems ok, what am i missing? > > > > > > > > > > On Wed, Feb 26, 2014 at 1:46 PM, GESCONSULTOR - =D3scar Bou < > > o.bou@gesconsultor.com> wrote: > > > >> Hi, James. > >> > >> I think that the GROUP BY clause should include all fields referenced = in > >> the SELECT that are not part of aggregation formulas (like SUM, AVG, > MIN, > >> MAX, etc.). > >> > >> As "Transaction"."fromParty_Party_ID_OID" is referenced on the SELECT > >> part without being included on any of those aggregation formulas, it > should > >> be included on the GROUP BY section. > >> > >> HTH, > >> > >> Oscar > >> > >> > >> > >> El 26/02/2014, a las 13:38, james agada > escribi=F3: > >> > >> Took your advice and got it to work when I do not have the fromParty > >> attribute. What could i be doing wrong. This is the error > >> > >> 47:29,831 [Schema main DEBUG] Check of existence > of > >> > >> "DailySalesTotalForParty" returned no table > >> > >> 13:47:29,831 [Schema main DEBUG] Check of > existence > >> of "DailySalesTotalForParty" returned no table > >> > >> 13:47:29,831 [Schema main DEBUG] Creating table > >> "DailySalesTotalForParty" > >> > >> 13:47:29,831 [Schema main DEBUG] Creating table > >> "DailySalesTotalForParty" > >> > >> 13:47:29,831 [Schema main DEBUG] Creating table > >> "DailySalesTotalForParty" > >> > >> 13:47:29,832 [Schema main DEBUG] CREATE VIEW > >> "DailySalesTotalForParty" ( "transactionDate", "totalAmount" > >> "fromParty" ) AS SELECT "Transaction"."transactionDate" , > >> SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty_Party_ID_OID" AS "fromParty" FROM > >> "Transaction" GROUP BY "transactionDate" ORDER BY "transactionDate" > >> > >> 13:47:29,832 [Schema main DEBUG] CREATE VIEW > >> "DailySalesTotalForParty" ( "transactionDate", "totalAmount" > >> "fromParty" ) AS SELECT "Transaction"."transactionDate" , > >> SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty_Party_ID_OID" AS "fromParty" FROM > >> "Transaction" GROUP BY "transactionDate" ORDER BY "transactionDate" > >> > >> 13:47:29,832 [Schema main DEBUG] CREATE VIEW > >> "DailySalesTotalForParty" ( "transactionDate", "totalAmount" > >> "fromParty" ) AS SELECT "Transaction"."transactionDate" , > >> SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty_Party_ID_OID" AS "fromParty" FROM > >> "Transaction" GROUP BY "transactionDate" ORDER BY "transactionDate" > >> > >> 13:47:29,833 [Datastore main ERROR] Error thrown > >> executing CREATE VIEW "DailySalesTotalForParty" ( "transactionDate", > >> "totalAmount" "fromParty" ) AS SELECT > "Transaction"."transactionDate" > >> , SUM("Transaction"."faceValue") AS "totalAmount" , > >> "Transaction"."fromParty_Party_ID_OID" AS "fromParty" FROM > >> "Transaction" GROUP BY "transactionDate" ORDER BY "transactionDate" > : > >> unexpected token: fromParty required: ) > >> > >> java.sql.SQLSyntaxErrorException: unexpected token: fromParty required= : > ) > >> > >> at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > >> > >> at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > >> > >> at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) > >> > >> > >> > >> And this is the class now > >> > >> package dom.todo; > >> > >> > >> import java.math.BigDecimal; > >> > >> import java.util.List; > >> > >> > >> import javax.jdo.annotations.Extension; > >> > >> import javax.jdo.annotations.IdentityType; > >> > >> import javax.jdo.annotations.InheritanceStrategy; > >> > >> > >> import org.joda.time.LocalDate; > >> > >> > >> import org.apache.isis.applib.AbstractViewModel; > >> > >> import org.apache.isis.applib.annotation.Bookmarkable; > >> > >> import org.apache.isis.applib.annotation.DescribedAs; > >> > >> import org.apache.isis.applib.annotation.Hidden; > >> > >> import org.apache.isis.applib.annotation.Immutable; > >> > >> import org.apache.isis.applib.annotation.Optional; > >> > >> import org.apache.isis.applib.annotation.Render; > >> > >> import org.apache.isis.applib.annotation.Render.Type; > >> > >> import org.apache.isis.applib.annotation.Title; > >> > >> > >> > >> > >> /** > >> > >> * View model that provides a summary of the sales made on a given day = by > >> each party > >> > >> @javax.jdo.annotations.PersistenceCapable( > >> > >> identityType =3D IdentityType.NONDURABLE, > >> > >> table =3D "DailySalesTotalForParty", > >> > >> extensions =3D { > >> > >> @Extension(vendorName =3D "datanucleus", key =3D "view-definition", > >> > >> value =3D "CREATE VIEW \"DailySalesTotalForParty\" " + > >> > >> "( " + > >> > >> " {this.transactionDate}, " + > >> > >> " {this.fromParty}, " + > >> > >> " {this.transactiontype}, " + > >> > >> " {this.totalAmount} " + > >> > >> ") AS " + > >> > >> "SELECT " + > >> > >> " \"Tranaction\".\"transactionDate\" , " + > >> > >> " \"Transaction.\".\"fromParty\", " + > >> > >> " \"Transaction.\".\"transactiontype\", " + > >> > >> " SUM(\"Transaction\".\"facevalue\") AS \"totalAmount\", " + > >> > >> " FROM \"Transaction\" " + > >> > >> "GROUP BY " + > >> > >> " \"fromParty\", " + > >> > >> " \"transactionDate\" , " + > >> > >> " \"transactiontype\"" + > >> > >> "ORDER BY " + " \"fromParty\", " + > >> > >> " \"transactionDate\" , " + > >> > >> " \"transactiontype\"" ) > >> > >> }) > >> > >> > >> > >> */ > >> > >> @javax.jdo.annotations.PersistenceCapable( > >> > >> identityType =3D IdentityType.NONDURABLE, > >> > >> table =3D "DailySalesTotalForParty", > >> > >> extensions =3D { > >> > >> @Extension(vendorName =3D "datanucleus", key =3D "view-definiti= on", > >> > >> value =3D "CREATE VIEW \"DailySalesTotalForParty\" " + > >> > >> "( " + > >> > >> " {this.transactionDate}, " + > >> > >> " {this.totalAmount} " + > >> > >> " {this.fromParty} " + > >> > >> ") AS " + > >> > >> "SELECT " + > >> > >> " \"Transaction\".\"transactionDate\" , " + > >> > >> > >> " SUM(\"Transaction\".\"faceValue\") AS > >> \"totalAmount\" ," + > >> > >> " \"Transaction\".\"fromParty_Party_ID_OID\" AS > >> \"fromParty\" " + > >> > >> " FROM " + > >> > >> " \"Transaction\" " + > >> > >> "GROUP BY " + > >> > >> " \"transactionDate\" " + > >> > >> "ORDER BY " + > >> > >> " \"transactionDate\" ") > >> > >> }) > >> > >> @javax.jdo.annotations.Inheritance(strategy =3D > >> InheritanceStrategy.NEW_TABLE) > >> > >> @javax.jdo.annotations.Queries( { > >> > >> @javax.jdo.annotations.Query( > >> > >> name=3D"DailySalesForParty", language=3D"JDOQL", > >> > >> value=3D"SELECT FROM dom.todo.DailySalesTotalForParty WHERE fromParty = =3D=3D > >> :party ") > >> > >> }) > >> > >> @Bookmarkable > >> > >> @Immutable > >> > >> public class DailySalesTotalForParty { > >> > >> > >> // ////////////////////////////////////// > >> > >> /** > >> > >> @javax.jdo.annotations.Column(allowsNull =3D "false") > >> > >> private String fromParty; > >> > >> > >> /** > >> > >> * Lazily loaded from the {@link #getReference() reference}, provid= es > >> access > >> > >> * to the underlying {@link Property}. > >> > >> @Optional > >> > >> @Title(sequence =3D "1") > >> > >> public String getFromParty() { > >> > >> return fromParty; > >> > >> } > >> > >> > >> public void setFromParty(final String party) { > >> > >> this.fromParty =3D party; > >> > >> } > >> > >> */ > >> > >> // ////////////////////////////////////// > >> > >> private java.math.BigInteger fromParty; > >> > >> @Optional > >> > >> public java.math.BigInteger getFromParty(){ > >> > >> return this.fromParty; > >> > >> } > >> > >> public void setFromParty_Party_ID_OID(java.math.BigInteger id ){ > >> > >> this.fromParty =3Did; > >> > >> } > >> > >> > >> ////////////////////////////////////// > >> > >> private LocalDate transactionDate; > >> > >> > >> @Title(sequence =3D "2", prepend =3D " - ") > >> > >> public LocalDate getTransactionDate() { > >> > >> return transactionDate; > >> > >> } > >> > >> > >> public void setTransactionDate(final LocalDate dueDate) { > >> > >> this.transactionDate =3D dueDate; > >> > >> } > >> > >> > >> // ////////////////////////////////////// > >> > >> > >> private BigDecimal totalAmount; > >> > >> > >> public BigDecimal getTotalAmount() { > >> > >> return totalAmount; > >> > >> } > >> > >> > >> public void setTotalAmount(final BigDecimal total) { > >> > >> this.totalAmount =3D total; > >> > >> } > >> > >> > >> > >> > >> // ////////////////////////////////////// > >> > >> > >> /** @Render(Type.EAGERLY) > >> > >> public List getTransactions() { > >> > >> return transactions.findTransactionForPartyOnDate(getFromParty(), > >> getTransactionDate()); > >> > >> } > >> > >> */ > >> > >> // ////////////////////////////////////// > >> > >> > >> private Partytypes partytypes; > >> > >> > >> final public void injectPartytypes(final Partytypes partytypes) { > >> > >> this.partytypes =3D partytypes; > >> > >> } > >> > >> > >> private Transactions transactions; > >> > >> > >> final public void injectTransactions(final Transactions > transactions) { > >> > >> this.transactions =3D transactions; > >> > >> } > >> > >> > >> } > >> > >> > >> > >> On Mon, Feb 24, 2014 at 11:44 PM, Dan Haywood > >> wrote: > >> > >> On 24 February 2014 21:38, james agada wrote: > >> > >> You are right. It comes from this definition - not sure what is wrong > >> > >> with > >> > >> it > >> > >> I can see several issues, some trivial, some probably the cause... > >> > >> > >> If, once you've addressed these, there are still issues, then I sugges= t > >> you > >> strip the class back to a single field, get that working, and then bui= ld > >> it > >> up bit by bit... > >> > >> Dan > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> * /* * Licensed to the Apache Software Foundation (ASF) under one * = or > >> more contributor license agreements. See the NOTICE file * distribut= ed > >> with this work for additional information * regarding copyright > >> > >> ownership. > >> > >> The ASF licenses this file * to you under the Apache License, Version > >> > >> 2.0 > >> > >> (the * "License"); you may not use this file except in compliance * > >> > >> with > >> > >> the License. You may obtain a copy of the License at * * > >> http://www.apache.org/licenses/LICENSE-2.0 > >> * * Unless required by > >> applicable law or agreed to in writing, * software distributed under > the > >> License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR > >> CONDITIONS OF ANY * KIND, either express or implied. See the License > >> > >> for > >> > >> the * specific language governing permissions and limitations * unde= r > >> > >> the > >> > >> License. */* > >> > >> (trivial) you probably will want to change the license... > >> > >> > >> > >> > >> * package dom.todo;* > >> > >> (trivial) ... and the package > >> > >> > >> > >> [snip] > >> > >> > >> > >> /** > >> * View model that provides a summary of the sales made on a given day = by > >> each party > >> */ > >> @javax.jdo.annotations.PersistenceCapable( > >> identityType =3D IdentityType.NONDURABLE, > >> table =3D "DailySalesTotalForParty", > >> extensions =3D { > >> @Extension(vendorName =3D "datanucleus", key =3D "view-definiti= on", > >> value =3D "CREATE VIEW \"DailySalesTotalForParty\" " + > >> "( " + > >> " {this.transactionDate}, " + > >> > >> * " {this.fromPartyId}, " +* > >> > >> > >> I don't think JDO is clever enough to convert this id into a reference > to > >> a > >> Party (how would it know?) So you should do what we did > >> in InvoiceSummaryForPropertyDueDate in Estatio (which is what I think > you > >> based this on) and make FromParty a derived field that does the lookup > >> from > >> a (new) fromPartyId field. > >> > >> > >> > >> > >> > >> * " {this.transactiontype}, " +* > >> > >> > >> there is no 'transactiontype' field on your class ... > >> > >> > >> > >> " {this.totalAmount} " + > >> ") AS " + > >> "SELECT " + > >> > >> * " \"Tranaction\".\"transactiondate\" , " +* > >> > >> > >> > >> the typo on this line "Tranaction". > >> > >> Also, I suggest keeping capitalization consistent, ie transactionDate, > not > >> transactiondate. > >> > >> > >> > >> " \"Transaction.\".\"fromParty\", " + > >> " \"Transaction.\".\"transactiontype\", " > >> + > >> " SUM(\"Transaction\".\"facevalue\") AS > >> \"totalAmount\", " + > >> " FROM \"Transaction\" " + > >> "GROUP BY " + > >> " \"Transaction\".\"fromParty\", " + > >> " \"Transaction\".\"transactiondate\" , " + > >> " \"Transaction\".\"transactiontype\"" + > >> "ORDER BY " + " > >> \"Transaction\".\"fromParty\", " + > >> " \"Transaction\".\"transactiondate\" , " + > >> " \"Transaction\".\"transactiontype\"" ) > >> }) > >> @javax.jdo.annotations.Inheritance(strategy =3D > >> InheritanceStrategy.NEW_TABLE) > >> @javax.jdo.annotations.Queries( { > >> @javax.jdo.annotations.Query( > >> name=3D"DailySalesForParty", > >> language=3D"JDOQL", > >> value=3D"SELECT FROM > >> dom.todo.DailySalesTotalForParty WHERE fromParty =3D=3D :party ") > >> }) > >> @Bookmarkable > >> @Immutable > >> public class DailySalesTotalForParty { > >> > >> // ////////////////////////////////////// > >> > >> > >> @javax.jdo.annotations.Column(allowsNull =3D "false") > >> private Party fromParty; > >> > >> > >> > >> > >> > >> > >> * /** * Lazily loaded from the {@link #getReference() > >> > >> reference}, > >> > >> provides access * to the underlying {@link Property}. */* > >> > >> > >> > >> This comment is from the Estatio code (but does describe what you shou= ld > >> do > >> to resolve "FromParty"). > >> > >> > >> @Optional > >> @Title(sequence =3D "1") > >> public Party getFromParty() { > >> return fromParty; > >> } > >> > >> public void setFromParty(final Party party) { > >> this.fromParty =3D party; > >> } > >> > >> // ////////////////////////////////////// > >> > >> private LocalDate transactionDate; > >> > >> @Title(sequence =3D "2", prepend =3D " - ") > >> public LocalDate getTransactionDate() { > >> return transactionDate; > >> } > >> > >> public void setTransactionDate(final LocalDate dueDate) { > >> this.transactionDate =3D dueDate; > >> } > >> > >> // ////////////////////////////////////// > >> > >> private BigDecimal totalAmount; > >> > >> public BigDecimal getTotalAmount() { > >> return totalAmount; > >> } > >> > >> public void setTotalAmount(final BigDecimal total) { > >> this.totalAmount =3D total; > >> } > >> > >> > >> // ////////////////////////////////////// > >> > >> /** @Render(Type.EAGERLY) > >> public List getTransactions() { > >> return transactions.findTransactionForPartyOnDate(getFromParty(= ), > >> getTransactionDate()); > >> } > >> **/ > >> // ////////////////////////////////////// > >> > >> private Partytypes partytypes; > >> > >> final public void injectPartytypes(final Partytypes partytypes) { > >> this.partytypes =3D partytypes; > >> } > >> > >> private Transactions transactions; > >> > >> final public void injectTransactions(final Transactions > >> > >> transactions) { > >> > >> this.transactions =3D transactions; > >> } > >> > >> } > >> > >> > >> > >> > >> > >> =D3scar Bou Bou > >> Responsable de Producto > >> Auditor Jefe de Certificaci=F3n ISO 27001 en BSI > >> CISA, CRISC, APMG ISO 20000, ITIL-F > >> > >> 902 900 231 / 620 267 520 > >> http://www.twitter.com/oscarbou > >> > >> http://es.linkedin.com/in/oscarbou > >> > >> http://www.GesConsultor.com > >> > >> > >> > >> Este mensaje y los ficheros anexos son confidenciales. Los mismos > >> contienen informaci=F3n reservada que no puede ser difundida. Si usted= ha > >> recibido este correo por error, tenga la amabilidad de eliminarlo de s= u > >> sistema y avisar al remitente mediante reenv=EDo a su direcci=F3n > electr=F3nica; > >> no deber=E1 copiar el mensaje ni divulgar su contenido a ninguna perso= na. > >> Su direcci=F3n de correo electr=F3nico junto a sus datos personales co= nstan > >> en un fichero titularidad de Gesdatos Software, S.L. cuya finalidad es > la > >> de mantener el contacto con Ud. Si quiere saber de qu=E9 informaci=F3n > >> disponemos de Ud., modificarla, y en su caso, cancelarla, puede hacerl= o > >> enviando un escrito al efecto, acompa=F1ado de una fotocopia de su D.N= .I. > a > >> la siguiente direcci=F3n: Gesdatos Software, S.L. , Paseo de la > Castellana, > >> 153 bajo - 28046 (Madrid), y Avda. Cortes Valencianas num. 50, 1=BAC - > 46015 > >> (Valencia). Asimismo, es su responsabilidad comprobar que este mensaje= o > >> sus archivos adjuntos no contengan virus inform=E1ticos, y en caso que= los > >> tuvieran eliminarlos. > >> > >> > >> > >> > >> > >> > > > --20cf303f6b389b814404f350896e--