Return-Path: X-Original-To: apmail-ofbiz-user-archive@www.apache.org Delivered-To: apmail-ofbiz-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 5DA73D4D2 for ; Mon, 30 Jul 2012 14:52:32 +0000 (UTC) Received: (qmail 82596 invoked by uid 500); 30 Jul 2012 14:52:31 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 82575 invoked by uid 500); 30 Jul 2012 14:52:31 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Received: (qmail 82565 invoked by uid 99); 30 Jul 2012 14:52:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 14:52:31 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mz4wheeler@gmail.com designates 209.85.216.172 as permitted sender) Received: from [209.85.216.172] (HELO mail-qc0-f172.google.com) (209.85.216.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2012 14:52:25 +0000 Received: by qcac10 with SMTP id c10so3244431qca.31 for ; Mon, 30 Jul 2012 07:52:04 -0700 (PDT) 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=nsw78bMAnp5M5z12DcgHBSPC10TeXy3Yl6WnUxp9IwQ=; b=V9xrR7e3v38jqs2Mi3fh0g/q7Qz0xuHGbAzg57gilsAvlAFdDnQV3AwJ/q+1iTV2at y3/1xJfAtnyc3tyrx//mdOybmOe3weFlOZbfDkTQcqA9DTS/TtECEDUrEpfdidkdcewB bsTpS/rjs7w/gdZqQesUsKWOCSq+nGNt44k+AR0E5/kRqTd1eVYVrOl7o97cutW1cWNn 1uhOQbxSybiZF0gLu4EHTY43qHDPcjewOOD5BbJNnb43hjjwcaQ0DSeZGys81hI3UX4W NXZ81nBU5Qkcptybi4divYH82AMoEqw9kC7Mc/VzvhsYxO27O7Q0gfF/IaXOOFPcTeYy XSXw== MIME-Version: 1.0 Received: by 10.60.22.165 with SMTP id e5mr17731784oef.60.1343659924164; Mon, 30 Jul 2012 07:52:04 -0700 (PDT) Received: by 10.182.47.166 with HTTP; Mon, 30 Jul 2012 07:52:04 -0700 (PDT) In-Reply-To: <1343609498668-4635353.post@n4.nabble.com> References: <1343609498668-4635353.post@n4.nabble.com> Date: Mon, 30 Jul 2012 07:52:04 -0700 Message-ID: Subject: Re: Problem with Primary Key String From: Mike To: user@ofbiz.apache.org Content-Type: multipart/alternative; boundary=e89a8fb1ed3c7a91b804c60d343e --e89a8fb1ed3c7a91b804c60d343e Content-Type: text/plain; charset=UTF-8 Just a comment. In all the years I've been dealing with databases, it was never considered good practice (and has always been avoided) to have a space character in any primary key, although technically it should work. It looks like you discovered an edge case in ofbiz. Even if you manage to initially get it to work, there may be other places where the problem will show up. Maybe use an underscore (_) instead, --or-- define another entity, maybe called 'attrDesc' that contains the spaced TEXT? On Sun, Jul 29, 2012 at 5:51 PM, Robert G. wrote: > Hello, > > I refer i.ex. to ProductCategoryAttribute > There is a primary Key named "attrName" (id-long-ne, but I changed to > id-ne). > > when I safe a as attrName a String like: "This String" it safes the value. > But when I want to delete this attribute, I get an error, that it is not > found. Now I realised, that when the service gets the value from database > it > makes this string: "This*+*String", so it inserts a "+" instead of the > whitespace --> of course now it cannot find the corresponding > entityinstance. > > How can I work arround there? I tried sth like: > from-field="${bsh:parameters.attrName.replaceAll('+',' > '}" /> > If this would work, I do not like this solution, cause when I have to > handle > lots of values, this is not a nice work around. > > Has PK Fields have to be a single string? Cause I wanted to name the > attribute correctly, just as I show it in my eccommerce application, so if > I > have to use a single string, I need to add e new column to that entity. > > What would you do? > > Thanks > > > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Problem-with-Primary-Key-String-tp4635353.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > --e89a8fb1ed3c7a91b804c60d343e--