JPA: path expression to collection illegal according to spec
hi,
the query over the 1:n relationship 'katergorien'
em.createQuery("select distinct k from KategorieGruppe k " +
"where k.kategorien.bezeichnung like ?1 " +
"order by k.bezeichnung asc");
works perfectly with toplink-essentials 2.b22 but according to the jpa spec section 4.4.4 it's illegal (and it fails in openJPA).
see also http://issues.apache.org/jira/browse/OPENJPA-81
jakob
Message was edited by:
jbraeuchi
The JPA 2.0 specification has added support for passing collections to IN parameters. We have not yet started this work in our development of the JPA 2.0 reference implementation in the EclipseLink Project.
The JPA 2.0 development status page is available at: http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0
For now you'll need to continue to expand things yourself or build the query using the underlying native API.
Doug
Similar Messages
-
X-path expression in Receiver determination
Hi,
I am working on JDBC to SOAP interface using BPM in PI7.0.
I am trying to use the XPath function in creating a condition in my receiver determination to route messages to two different business systems. My issue is that i could not find the JDBC message structure in x-path expression.
Any one please can help me on this.
Thanks In Advance!Hi,
For x-path expressions in the receiver determination, you would not be able to choose the sender structure fields like you would do normally. You would have to provide the x-path manually, starting from the root node upto the required field.
Regards -
Hi
I have a 136 GB content database which will not back up via Backup-SPSite ( Microsoft say you cannot backup more than 100GB).
So with out Backup / Restore how can I convert a Path Based Site Collection to a Host Named Site Collection with my 136 GB content database which incidentally uses Remote Blob Storage ?
Thanks
Nigel
Nigel Price NJPEnterprisesI see two options:
Make the Backup-SPSite work despite being over 100GB (that's going to be a supported limit rather than a hard boundary)
Externalise some of the content and then re-insert it after the move. -
Sequence path expression for remote execution
I usually specify path name expressions with double backslashes to avoid problems when a backslash is followed by a character interpreted as an escape sequence (e.g. C:\test, where \t would be the Escape sequence for a TAB).
Now I tried to execute a sequence on a remote computer. The sequence was specified in an expression string as "D:\\TestStand\\Sequences\\Test.seq" and I got the message that the sequence file could not be found on the remote computer. Using the expression string "D:\TestStand\Sequences\Test.seq" worked fine.
What is the safest way to handle strings with path expressions in TestStand consistently?
Regards
PeterHi Johann,
thank you. Problem is that it is not necessarily the path of my current sequence file, but some path that I build in an expression. So I do not have a source generated by TestStand which should always work.
As far as I understand the documentation, "C:\test" would expand to "C: est" (the spaces representing a tab), "C:\Test" would remain as is, "C:\\test" would expand - or rather shrink - to "C:\test".
So for safety, I would always build paths with double backslashes, but that does not work with the Remote Engine (i.e., not a different tool, but a part of TestStand itself).
So the question is, can I rely on a single backslash to be treated correctly in a path name and not expand into an Escape sequence? Or can, possibly, the remote engine work with forward slashes in paths?
Best regards,
Peter -
Path expression for custom generic object
I am creating a user defined generic object so that I can use path expression to edit them from the form. Below is the code snippet. However the path expression is coming as null. Please let me know if I am missing anything
<block>
<set name='newGen'>
<new class='com.waveset.object.GenericObject'/>
</set>
<invoke name='put'>
<ref>newGen</ref>
<s>attribute1</s>
<s>attributevalue1</s>
</invoke>
<invoke name='put'>
<ref>newGen</ref>
<s>attribute2</s>
<s>attributevalue2</s>
</invoke>
<set name='newGen1'>
<new class='com.waveset.object.GenericObject'/>
</set>
<invoke name='put'>
<ref>newGen1</ref>
<s>attribute1</s>
<s>attributevalue1</s>
</invoke>
<invoke name='put'>
<ref>newGen1</ref>
<s>attribute2</s>
<s>attributevalue2</s>
</invoke>
<set name='testList'>
<list>
<ref>newGen</ref>
<ref>newGen1</ref>
</list>
</set>
<set name='newGenObj'>
<new class='com.waveset.object.GenericObject'/>
</set>
<invoke name='put'>
<ref>newGenObj</ref>
<s>masterAttribute</s>
<ref>testList</ref>
</invoke>
*{color:#ff0000} <ref>newObj.masterAttribute[0].attribute1</ref> coming as null*
*</block>{color}*Yes you are missing some things......
First af all you create a GenericObject newGenObj which contains an attribute (masterAttribute) which contains a list of generic objects.
The right code snippet to access for example the value of attribute1 of the generic object newGen is as follows
<invoke name='get'>
<invoke name='get'>
<ref>newGenObj.masterAttribute</ref>
<i>0</i>
</invoke>
<s>attribute1</s>
</invoke> -
Using Rename() method to change the Url of path based site collection
Hello All,
Is it correct to use
SPSite.Rename() method for changing the url of path based site collection(except the root)?
For example:
Old Site Url: http://portal.contoso.net/sites/HR
New Site Url: http://portal.contoso.net/sites/HROLD
It is working in SharePoint 2013 test environment, but I will be happy to receive some feedback from you about this.
Ivan Yankulov
SharePoint Admin/Consultant
http://spyankulov.blogspot.com/
This post is my own opinion and does not necessarily reflect the opinion or view of MicrosoftHi Lvan,
Yes, the server object model SPSite.Rename() method works on an SPSite object to change the URL of a site collection which is host named or path based.
Best Regards,
Eric
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
JPA Named Parameters, with collections
Hi
Is it possible with JPA to pass in a collection as named parameter into a query.
ArrayList() list = new ArrayList();
list.add("1");
lsit.add("2");
i.e. em.createNamedQuery("named").setParameter("collection",list).getResultList();
where the named query is something like
SELECT i FROM Person i WHERE i.address IN (:collection)
This throws an error: IllegalArgumentException: You have attempted to set a value of type class java.util.ArrayList for parameter collection with expected type of class java.lang.String from query
If it is possible what am i doing wrong??
Thanks
Message was edited by:
glen_Though this is possible in TopLink's expression framework, it is against the JPA spec. Section 4.6.8 states: "The literal and/or input_parameter values must be like the same abstract schema type of the state_field_path_expression in type", hence the exception in TopLink Essentials.
I've added feature request https://glassfish.dev.java.net/issues/show_bug.cgi?id=2484 for this functionality.
Best regards,
Chris -
Binding expressions and collections
<quote>
In addition to being able to read the initial value of a field from an object, value binding expressions can also be used to navigate maps, lists, or arrays. Here are some examples:
#{foo[bar]}
#{foo["bar"]}
#{foo[3]}
#[foo[3].bar}
#{foo.bar[3]}
</quote>
Could anyone explain how does it work ? Is foo is always bean ?
Isn't #{foo["bar"]} identical to #{foo.bar}
Also in "Core JSF" they say #{foo.bar[3]} doesn't work if bar indexed property of a bean.
<anotherquote>
The syntax of a method binding expression has two primary formats:
#{expr-a.value-b}
#{expr-a[value-b]}
The first format is a classic DOM-style object tree structure. The second format can be used to call a method pointed to from an object array, Map, or List.
</anotherquote>
The same question how to use the second form.An expression is a little piece of softwaremuch like a scriptthat evaluates to a single value for a single layer property at a specific point in time. Whereas scripts tell an application to _do_ something, an expression says that a property _is_ something.
With expressions, you can create relationships between layer properties and use the keyframes of one property to dynamically animate other layers. For example, you can use the pick whip to link path properties, so a mask can take its path from a brush stroke or a shape layer object.
The expression language is based on the standard JavaScript language, but you do not need to know JavaScript to use expressions. You can create expressions by using the pick whip or by copying simple examples and modifying them to suit your needs.
Be sure to read the
"Expressions" section of After Effects Help on the Web.
Dan Ebberts has an excellent collection of example expressions and scripts and tutorials for learning how to work with expressions and scripts on his website: http://www.adobe.com/go/learn_ae_motionscripthome.
The AE Enhancers forum provides many examples and much information about expressions, as well as scripts and animation presets: http://www.adobe.com/go/learn_ae_aeenhancershome.
JJ Gifford provides several example projects on his website that demonstrate how to use expressions: http://www.adobe.com/go/learn_ae_jjgiffordexpressions. -
Matches from regular expression into collection
Hello,
I need to do the following:
I have a long string with some similar repeated data. I would like, using a regular expression, to extracts all matches in a collection. Is there a way of performing this task?
I have look through the owa_pattern package, but as far as I found out, I can extract only a simple match. Here is an exact quote:
"If multiple overlapping strings can match the regular expression, this function takes the longest match. " - http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/w_patt.htm
So what can I do if I want to get all the matches?
Thank you in anticipation. Any help would be appreciated.
Best regards,
beroetzI think your need a tokenizer-function.
If the string +:in_str+ is delimited by +:in_delimiter+ you could try this:
SELECT REGEXP_REPLACE(REGEXP_SUBSTR( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, LEVEL ), :in_delimiter, '') TOKEN
BULK COLLECT INTO :my_nested_table
FROM DUAL
CONNECT BY REGEXP_INSTR( :in_str || :in_delimiter, '(.*?)' || :in_delimiter, 1, LEVEL ) > 0
ORDER BY LEVEL ASC;
I wrote a string-to-textarray-tokenizer (and it's pendant) some times ago, being able to cut from certain positions within the string using regular expressions and return the elements into an nested table of varchar2. It looks like:
TYPE pos_arraytype IS TABLE OF POSITIVE ;
TYPE text_arraytype IS TABLE OF VARCHAR2(2000);
FUNCTION stringToTextarray(in_str IN VARCHAR2, in_pos_arr IN pos_arraytype, in_regexp_arr IN text_arraytype DEFAULT NULL, in_trim_strings IN BOOLEAN DEFAULT TRUE)
RETURN text_arraytype ;
in_str is the string to be tokenized
in_pos_arr is a table of positive values of positions in the string to be cut
in_regexp_arr is a table of regular expressions to use at each position declared by in_pos_arr
in_trim_strings is a flag, if the cutted element should be trimmed
using above for example:
in_str = 'Markus van Muster 347651234XY Musterdaam ABCDE'
in_pos_arr = (1, 13, 35, 35, 42)
in_regexp_arr = ('(.?){12}', '([^[:digit:]]?){22}', '[[:digit:]]{4}', '[[:alpha:]]{2}', '(.?){14}')
in_trim_strings = TRUE
RETURN collection ('Markus','van Muster','1234','XY','Musterdaam')
If you need the code, then tell me! I'm looking for....
Cheers,
Martin
Edited by: Nuerni on 17.10.2008 08:49 -
Regular Expressions and Collections
Is it possible to use refular expressions when validating collection items?
I have a loop that checks collection values for null, not null etc. I would also like to validate the format of some text fields in the same collection loop.
i.e.
for i in 1..htmldb_application.g_f02.count
loop
if
replace(htmldb_application.g_f07(i), 'NULL',NULL) is null
and TO_NUMBER(NVL(htmldb_application.g_f02(i), 0)) > 0
THEN
return 'A Demand Quantity Value Must Be Specified.';
elsif
-- check htmldb_application.g_f07(i) is correctly formatted using Reg Expressions
then
return 'Reg Expression error text goes here';
end if;
end loop;
Regards
DuncanWell, the obvious answer is "only write the data to the database if the input doesn't match the regular expression."
Presumably you're really asking how to do that - but it depends upon how your application is structured in the first place, and you haven't told us anything at all about that. -
Add arrowhead to shape layer using trim paths & expressions?
Hi,
I am trying to use expressions to attach an arrowhead to a shape layer.
I'm using the 'trim paths' effect on the shape layer to grow a stroke over time (using the start/end/offset features).
I would like to attach an arrowhead to the tip of the stroke, using an expression to animate it dynamically (e.g. the arrowhead follows the stroke when animated using the start/end/offset values)
I've attached a basic project file if anyone can help?
94_shapelayerarrowhead.zip
Thanks for your time, any help appreciated
TimThe easiest way to do this is to use a stroked path to reveal the shape layer, then copy and paste the path to the position property of the arrowhead. Auto orient the arrowhead to the path and adjust the timing of both the stroke and the arrowhead position to match them up.
Using trim path makes it more difficult to adjust timing than using start and end for stroke and I can't think of an automatic way to match the timing with an expression.
Another option would be to pre-compose your arrowhead layer after you've used the path for position, then use time remapping to adjust the timing. This may be the easiest solution if you have a lot of timing changes to follow. -
QL "In Expression" with Collection|String[] input parameter
Hello,
I would like to use the 'IN expression' in EJB-QL, with an input parameter, containing the values of the input list.
Scheme Order with fields:
id
name
status I Would like to get all records with certain status-values, for example 'open' or 'closed'
The final sql code executed for the example at runtime will be:
select * from order where status in('open', 'closed')I would like to do this parameter-based in EJB-QL.
The signature of the finder it should be:
java.util.Collection findByStatus(java.util.Collection aStatusList)The Query would be:
query="SELECT OBJECT(t) FROM Order as t WHERE t.status in(?1)"However, this way doesn't work, even when I change the parameter type to java.lang.String[]. A dirty way to check multiple statusses, is to add a parameter for each status:
* @ejb.finder
* signature="java.util.Collection findByStatus(java.lang.String aStatus, java.lang.String anotherStatus)"
* query="SELECT OBJECT(t) FROM Order as t WHERE t.status IN (?1, ?2)"
*/This is not a generic solution. Is it possible to send a Collection or array input parameter, as items in the list of "in expressions"?Ok, I wondered if it was possible. I just thought that
another solution might work: by defining my own
Collection datatype, with a tostring method that
returns data in format "'value1', 'valu2', '...'" . I
will try that at last, if I find the time.I didn't quite follow what you meant. But from whatever I understand, just binding your own defined datatype wouldn't cause toString to be invoked on it, right?
You are going to have to know upfront how many parameters are going to be there. I faced a similar situation once. I was just using SQL though and not EJB-QL. But couldn't use PreparedStatement with the IN clause because of this. I guess this limitation of PreparedStatement is well-known. -
Hi Gurus,
i've gone thru the XPath tutorial http://www.w3schools.com/xpath/xpath_syntax.asp
i've a small doubt in "selecting nodes" section. i'm unable to understand the diference between two expressions '/' and '//'. can anyone explain me with example or just send me results of the following XML document
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
for the following expressions
bookstore
/bookstore
bookstore/book
//book
bookstore//book
//@lang
points will b rewarded
Thanks in advance
Faisal
Edited by: Abdul Faisal on Apr 10, 2008 9:02 AM
Edited by: Abdul Faisal on Apr 10, 2008 9:03 AMHi
check below (answers are in bold font)
for the following expressions
bookstore -
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
/bookstore - </bookstore>
bookstore/book -
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
//book
say , there is one more bookstore element with the name bookstore1 with the sttructure as follows
<bookstore1>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
</bookstore1>.
Then //book will return all the book elements in the document including the book element under bookstore1.
regards
krishna -
[ADF UIX] LOVs, what does the "dot" path expression do?
Hi
In developing an ADF UIX web page, I've let JDeveloper create a messageLovInput on the "ExternalSource" field for me as follows:
<messageLovInput
model="${bindings.ExternalSource}"
id="${bindings.ExternalSource.path}"
destination="refCodesExternalSourceLevelOneLov.uix"
partialRenderMode="multiple"
partialTargets="_uixState"/>
You'll notice that the id is set to blah-de-blah ".path". I can't find mention in the documentation of what the .path does. I think it should be documented in the section "About the Properties of the ADF Bindings" but has been excluded.
Does anybody have any idea what this binding value provides? And specifically what functionality it provides in the id as a apart of a messageLovInput?
Thanks!
CM.Or to be more specific, the messageLovInput supplying the following ID with ".path":
<messageLovInput
model="${bindings.DepartmentId}"
id="${bindings.DepartmentId.path}"
destination="lovWindow0.uix"/>
...is used by the LOV lovSelect event "SET" call target property below in returning a value to the calling page?
<event name="lovSelect">
<set property="inputValue"
value="${bindings.DepartmentId.inputValue}"
target="${data.departmentsUIModel.DepartmentId}"/>
</event>
.....and trying something like the following to return more than one field to the calling page would be pointless:
<event name="lovSelect">
<compound>
<set property="inputValue"
value="${bindings.DepartmentId.inputValue}"
target="${data.departmentsUIModel.DepartmentId}"/>
<set property="inputValue"
value="${bindings.DepartmentName.inputValue}"
target="${data.departmentsUIModel.DepartmentName}"/>
</compound>
</event>
..... as the calling messageLovInput can only supply one ID .path?
Oops, sorry, I hope that isn't too long winded. It's at the end of a very long day for me.....
Thanks for your help!
CM :) -
Compensation in Oracle BPEL not according to spec
Hello,
while playing around with the oracle BPEL engine and compensation I figured out, that the Oracle BPEL engine doesn't behave according to the BPEL standard as far as compensations are concerned:
The spec (http://www.ibm.com/developerworks/library/specification/ws-bpel/, S. 30) says:
"The <compensate> construct is used to invoke compensation on an inner scope that has
already completed normally.This construct can be invoked only from within a fault handler
or another compensation handler."
In fact - the BPEL Engine does invoke the scopes which have not finished as well. It does not compensate the scopes which have not been activated yet.
I assembled a running example in which I have 4 scopes: Error, Waiting, Running and Finished. The example is completely standalone - thus does not require any further webservices.
The Error-Scope triggers the compensation by throwing an exception. At that time another scope is still running and one has already finished. As your will see, the compensate after the fault invokes the compensate of the Scopes Error,Running and Finished. I had expected - that according to the specs - it should only had invoked the Finished scope.
This is what the ActiveEndpoints engine does. I compiled the sample example for ActiveEndpoint 3.1 and included it in the zip file.
The example can be downloaded at:
http://achrist.net/~a.christ/download/CompensateTest.zip
Is this behavior intended - and when - why is it not mentioned to be a derivation from the BPEL spec ?
Thanks in advance,
AndréHello!
Is there any news on this topic? I acutally experienced the same behaviour today.
My process has two service calls in parallel, each of the calls is surrounded by its own scope with compensation handlers. In the all surrounding scope I catch all faults and call both compensation handlers. The one for the faulted service call should behave like <empty>, but it doesn't and produces the next fault, as the system is unavailable.
Even worse, if the "faster" thread throws the fault the compensation for the "slower" thread is started, even though the service call in the "slower" thread hasn't even started.
I can't believe this is intended behaviour!!!
Am I missing something? Are there any workarounds? Can you please comment on this.
Thanks,
Markus
Maybe you are looking for
-
Silly makepkg.conf question
Does makepkg.conf dictate "make" behavior as well as "makepkg" behavior ? For instance if I use MAKEFLAGS="-j3" will I be able to benefit from it using regular "make" ?
-
Opening Excel file now shows column type in field value...
Just in the last 2 weeks, excel files that have fields set as 'General' are now displaying the word 'General' in the field. If you change it to another type (i.e. number or text) then it just displays the value. The file is originally created in Open
-
Azure Media Services and Overlays w/XAML storyboards and images
Hi, We are moving our Expression encoder service to the cloud. One feature we rely heavily on is the Overlay feature, utilizing a XAML file with storyboards. In order to do so, I upload some .jpg assets, then add them to the Task's InputAsset.Add()
-
HT1338 trying to update iTunes but get a corrupt message
trying to update iTunes but get a corrupt message
-
Best way to import multi-disc compilation album?
I have a rather extensive MP3 library (all my CD's are ripped to MP3) that I've maintained since about 1999. I just got my wife an iPod Nano last Christmas, and as such I never really used iTunes before a year ago. The only music in iTunes at the mom