Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 43907 invoked from network); 23 Sep 2008 11:38:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Sep 2008 11:38:09 -0000 Received: (qmail 70722 invoked by uid 500); 23 Sep 2008 11:38:06 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 70338 invoked by uid 500); 23 Sep 2008 11:38:05 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 70327 invoked by uid 99); 23 Sep 2008 11:38:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 04:38:05 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 11:37:05 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ki6D3-0001EZ-U8 for users@jackrabbit.apache.org; Tue, 23 Sep 2008 04:37:37 -0700 Message-ID: <19625837.post@talk.nabble.com> Date: Tue, 23 Sep 2008 04:37:37 -0700 (PDT) From: tremek To: users@jackrabbit.apache.org Subject: Problem with add new Node and search it. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rafal.kuc@biatel.com.pl X-Virus-Checked: Checked by ClamAV on apache.org Hi. In one function i add new node some like this: Node rootNode = session.getRootNode(); Node kTNode = rootNode.addNode("nameNode","nt:folder"); session.save; Next i make a Query.XPATH query like this: StringBuffer query = new StringBuffer(); query.append("/jcr:root//element(*,nt:folder)"); Workspace ws = session.getWorkspace(); QueryManager qm = ws.getQueryManager(); Query querySql = qm.createQuery(query.toString(),Query.XPATH); QueryResult result = querySql.execute(); for (NodeIterator it = result.getNodes(); it.hasNext(); ) { //make something } The resultset is empty. I noticed, that ItemState of kTNode is STATUS_NEW. How to search nodes when them ItemState is STATUS_NEW. When i do search in other function, the state of this node is STATUS_UNDEFINED and it works fine. Or how to change ItemState of node from STATUS_NEW to STATUS_UNDEFINED?. -- View this message in context: http://www.nabble.com/Problem-with-add-new-Node-and-search-it.-tp19625837p19625837.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.