Dear Andy,

I'm sorry, I have been delayed by a project and couldn't create a working 
example / reproduction of the problem. I still plan to do so. Seeing the issue, 
I will try to give this a higher priority. Thank you!

Best,
Daniel

-----Original Message-----
From: Andy Seaborne <a...@apache.org> 
Sent: Donnerstag, 15. April 2021 11:04
To: users@jena.apache.org
Subject: Re: Adding subquery to construct query with the query builder

Hi Daniel,

Did you find a way to make this work?

(There is now https://issues.apache.org/jira/browse/JENA-2092
<https://issues.apache.org/jira/browse/JENA-2092> top record the root issue)

     Andy

On 05/04/2021 15:07, Andy Seaborne wrote:
>
> Hi Daniel,
>
> Do you have a complete, minimal example? This needs a JIRA ticket 
> because it should work and I think details are going to matter.
>
> "SELECT *" -- if there are no other SELECT level clauses (e.g. LIMIT) 
> is a no-op as a projection.
>
> Maybe try with named variables.
>
>     Andy
>
>
> On 02/04/2021 12:02, Daniel Jeller wrote:
>> Hi,
>>
>> I’m trying to create a CONSTRUCT query using the Jena query builder and I 
>> couldn’t figure out how to correctly add a subquery. I’ve tried to create 
>> code similar to the following but in the end the expected “Select *” clause 
>> is missing, only the where parts are present.
>>
>> constructBuilder
>> .addConstruct(construct-clauses)
>> .addWhere(
>> whereBuilder
>> .addSubquery(
>> SelectBuilder
>> .addVar(“*”)
>> .addWhere(sub-where)
>> )
>> .addWhere(outer-where)
>> )
>>
>> What I’m trying to get is
>>
>> CONSTRUCT {
>>                 construct-clauses
>> }
>> WHERE {
>> SELECT * WHERE { sub-where}
>> outer-where
>> }
>>
>> But what I’m really getting is
>>
>> CONSTRUCT {
>>                 construct-clauses
>> }
>> WHERE {
>> WHERE { sub-where}
>> outer-where
>> }
>>
>> The “Select *” is missing. Am I doing something wrong with my query builder 
>> usage?
>>
>> Any help is appreciated! Thanks in advance.
>>
>> Daniel
>> --
>> Mag. Daniel Jeller
>> Monasterium / Digitisation / IT
>>
>> ICARUS
>> --
>> Spaces Central Station
>> Gertrude-Fröhlich-Sander Str. 2-4
>> Tower C, Floor 7-9
>> A-1100 Vienna
>> AUSTRIA
>>
>> Web:http://icar-us.eu<http://icar-us.eu/>
>> Platforms:http://monasterium.net<http://monasterium.net/>, 
>> http//matricula.info Join the ICARUS friends‘ 
>> association:http://4all.icar-us.eu<http://4all.icar-us.eu/>
>>

Reply via email to