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. <[email protected]> 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: > <set field="attrName" > 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. >
