You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Michael Brackx <mi...@gmail.com> on 2013/07/24 13:46:45 UTC

secondary type query - cmis:objectId

Hi,

There is a problem with the special virtual column cmis:objectId for
secondary object types.
Example query: "SELECT cmis:objectId FROM cmis:rm_clientMgtRetention"
Error: Walking of statement failed with RecognitionException error:
   cmis:objectId is not a property query name in any of the types in from
...
Using version 0.9.0.

QueryObject.resolveTypeForColumnReference() does not have special handling
for object id.
There is special handling in validateColumnReferenceAndResolveType(), but
before you get there you hit a
normal TypeValidator.typeContainsPropertyWithQueryName().

Michael

Re: secondary type query - cmis:objectId

Posted by Michael Brackx <mi...@gmail.com>.
My query is incorrect.
It is not allowed by the query BNF.
<table name>  ::= <identifier> !! This MUST be the name of a primary object-
type.

Maybe the paser could give another error.

Michael

On Wed, Jul 24, 2013 at 3:00 PM, Huebel, Jens <j....@sap.com> wrote:

> Then you might be correct that this is an issue.
>
> Let me check this. Perhaps you should open a JIRA issue.
>
> Jens
>
>
> On 24.07.13 14:54, "Michael Brackx" <mi...@gmail.com>
> wrote:
>
> >2.1.14.1.1
>
>

Re: secondary type query - cmis:objectId

Posted by "Huebel, Jens" <j....@sap.com>.
Then you might be correct that this is an issue.

Let me check this. Perhaps you should open a JIRA issue.

Jens


On 24.07.13 14:54, "Michael Brackx" <mi...@gmail.com> wrote:

>2.1.14.1.1


Re: secondary type query - cmis:objectId

Posted by Michael Brackx <mi...@gmail.com>.
Hi,

Yes, cmis:rm_clientMgtRetention is a secondary type (it is one that is
defined in the spec).

My understanding is that cmis:objectId should be available for all
secondary types, even without joins.

Form 2.1.14.1.1:
In addition, the virtual table for a secondary object type has one more
virtual column for the cmis:objectId property defined by each object’s
primary type. If a secondary object type does not define any property, then
its virtual table will have cmis:objectId as the only column, identifying
the objects to which the secondary type has been applied.

Michael

On Wed, Jul 24, 2013 at 2:42 PM, Huebel, Jens <j....@sap.com> wrote:

> Hi Michael,
>
> I assume that cmis:rm_clientMgtRetention is a secondary type, correct?
>
> In this case you cannot query for cmis:objectId because this is a property
> of a primary type (e.g cmis:document).
>
> You have to use a join if you want to combine properties of primary and
> secondary types
>
> Best regards
>
> Jens
>
>
> On 24.07.13 13:46, "Michael Brackx" <mi...@gmail.com>
> wrote:
>
> >Hi,
> >
> >There is a problem with the special virtual column cmis:objectId for
> >secondary object types.
> >Example query: "SELECT cmis:objectId FROM cmis:rm_clientMgtRetention"
> >Error: Walking of statement failed with RecognitionException error:
> >   cmis:objectId is not a property query name in any of the types in from
> >...
> >Using version 0.9.0.
> >
> >QueryObject.resolveTypeForColumnReference() does not have special handling
> >for object id.
> >There is special handling in validateColumnReferenceAndResolveType(), but
> >before you get there you hit a
> >normal TypeValidator.typeContainsPropertyWithQueryName().
> >
> >Michael
>
>

Re: secondary type query - cmis:objectId

Posted by "Huebel, Jens" <j....@sap.com>.
Hi Michael,

I assume that cmis:rm_clientMgtRetention is a secondary type, correct?

In this case you cannot query for cmis:objectId because this is a property
of a primary type (e.g cmis:document).

You have to use a join if you want to combine properties of primary and
secondary types

Best regards 

Jens


On 24.07.13 13:46, "Michael Brackx" <mi...@gmail.com> wrote:

>Hi,
>
>There is a problem with the special virtual column cmis:objectId for
>secondary object types.
>Example query: "SELECT cmis:objectId FROM cmis:rm_clientMgtRetention"
>Error: Walking of statement failed with RecognitionException error:
>   cmis:objectId is not a property query name in any of the types in from
>...
>Using version 0.9.0.
>
>QueryObject.resolveTypeForColumnReference() does not have special handling
>for object id.
>There is special handling in validateColumnReferenceAndResolveType(), but
>before you get there you hit a
>normal TypeValidator.typeContainsPropertyWithQueryName().
>
>Michael