From user-return-27787-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Wed Oct 30 20:25:42 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 339B7180654 for ; Wed, 30 Oct 2019 21:25:42 +0100 (CET) Received: (qmail 88194 invoked by uid 500); 30 Oct 2019 20:25:41 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 88182 invoked by uid 99); 30 Oct 2019 20:25:41 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2019 20:25:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5E7831A40E9 for ; Wed, 30 Oct 2019 20:25:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.159 X-Spam-Level: ** X-Spam-Status: No, score=2.159 tagged_above=-999 required=6.31 tests=[FORGED_HOTMAIL_RCVD2=1.187, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-he-de.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id RceIdgPu_0vx for ; Wed, 30 Oct 2019 20:25:39 +0000 (UTC) Received-SPF: Softfail (mailfrom) identity=mailfrom; client-ip=162.255.23.37; helo=n6.nabble.com; envelope-from=auni@hotmail.com; receiver= Received: from n6.nabble.com (n6.nabble.com [162.255.23.37]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTP id 9F5147F7A0 for ; Wed, 30 Oct 2019 20:25:38 +0000 (UTC) Received: from n6.nabble.com (localhost [127.0.0.1]) by n6.nabble.com (Postfix) with ESMTP id 81E2812427E4D for ; Wed, 30 Oct 2019 13:25:36 -0700 (MST) Date: Wed, 30 Oct 2019 13:25:36 -0700 (MST) From: niamin To: user@ignite.apache.org Message-ID: <1572467136530-0.post@n6.nabble.com> Subject: Spring Data native Query support MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Does Ignite provide native Query support using Spring Data? I am not able to bootstrap my application when I configure my Repository to include a method that implements a native query as below: @Repository @RepositoryConfig(cacheName = "FOO") public interface ARInvoiceRepository extends IgniteRepository { @Query(value = "SELECT * FROM AR_INVOICE i where i.customerId = :customerId " + "and i.installmentFl = 'N' and i.excludeFromArFl = 'N' and ((i.installmentNo > 0 " + "and i.installmentStartDt <= :toDate) or i.tranDt <= :toDate) and i.status != 'H' ", nativeQuery = true) List getInvoicesForOIStatement(@Param("customerId") String customerId, @Param("toDate") Date statementDate); } When I start my application I get an error as below: Caused by: java.lang.IllegalArgumentException: Not a managed type: class com.gpc.rpm.bo.ARInvoice at org.hibernate.metamodel.internal.MetamodelImpl.managedType(MetamodelImpl.java:473) ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final] at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.(JpaMetamodelEntityInformation.java:73) ~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE] at org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getEntityInformation(JpaEntityInformationSupport.java:66) ~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:180) ~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:118) ~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE] at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:101) ~[spring-data-jpa-2.0.9.RELEASE.jar:2.0.9.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:304) ~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE] at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$4(RepositoryFactoryBeanSupport.java:290) ~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE] at org.springframework.data.util.Lazy.getNullable(Lazy.java:141) ~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE] at org.springframework.data.util.Lazy.get(Lazy.java:63) ~[spring-data-commons-2.0.14.RELEASE.jar:2.0.14.RELEASE] I've added @Entity annotation to ARInvoice class but that didn't change the error. -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/