Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD5C49E30 for ; Fri, 27 Apr 2012 10:02:12 +0000 (UTC) Received: (qmail 23600 invoked by uid 500); 27 Apr 2012 10:02:12 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 23340 invoked by uid 500); 27 Apr 2012 10:02:11 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 23322 invoked by uid 99); 27 Apr 2012 10:02:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 10:02:11 +0000 X-ASF-Spam-Status: No, hits=0.9 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of coolyunus1986@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Apr 2012 10:02:06 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1SNhzl-0006eA-Ix for user@cayenne.apache.org; Fri, 27 Apr 2012 03:01:45 -0700 Date: Fri, 27 Apr 2012 03:01:45 -0700 (PDT) From: yunus To: user@cayenne.apache.org Message-ID: <1335520905562-3943892.post@n3.nabble.com> Subject: Fetching data from two related tables simultaneoulsy MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, i have problem..I want to fetch data from two tables which are inter related through primary key Scenario is: I have table Applicant in which there are attribute "name" & "ration_Id" and other table is Certificate which include attribute "status".Now i want to fetch data from both tables on the basis of "EnrolmentId" which is primary key of Applicant table and foreign key for Certificate and (then validation will be applied on obtained list ) how to store that list i.e*.list type* In Sql..it can be like this "Select a.name,a.ration_Id,c.status from Applicant a,Certificate c where a.enrolmentI=c.enrolmentId" But i want to know how to write it in Cayenne. -- View this message in context: http://cayenne.195.n3.nabble.com/Fetching-data-from-two-related-tables-simultaneoulsy-tp3943892p3943892.html Sent from the Cayenne - User mailing list archive at Nabble.com.