Dear Olivier
        That works magically, thanks a lot ~

Regards,
Kyle Huang

-----Original Message-----
From: olivier evalet (sib) [mailto:olivier.eva...@isb-sib.ch] 
Sent: 2012年10月10日 18:40
To: Huang, Kyle
Cc: d2rq-map-devel@lists.sourceforge.net
Subject: Re: [d2rq-dev] Confusing SQL WHERE clause generated when use 
conditional mapping

Did you try ,
map:OwnerConstraint a d2rq:ClassMap;
...

map:FreshnessConstraint a d2rq:ClassMap;
...

I guess the mapping should be discriminated for the to classes.

- olivier

>         d2rq:dataStorage map:database;
>         d2rq:uriPattern  "
> Data_Set_Ontology/2011/dataset/instances#SuitabilityConstraint-@@
> CONSTRAINT. CONSTRAINT_ID@@";
>         d2rq:condition " CONSTRAINT.TYPE='OWNER'";
>         d2rq:class vocab:OwnerConstraint;
>         d2rq:classDefinitionLabel "OwnerConstraint";
> map:CONSTRAINT a d2rq:ClassMap;
>         d2rq:dataStorage map:database;
>         d2rq:uriPattern  "
> Data_Set_Ontology/2011/dataset/instances#SuitabilityConstraint-@@
> CONSTRAINT. CONSTRAINT_ID@@";
>         d2rq:condition " CONSTRAINT.TYPE='FRESHNESS'";
>         d2rq:class vocab:FreshnessConstraint;
>         d2rq:classDefinitionLabel "FreshnessConstraint";
> however, then generated SQL is like :
> SELECT DISTINCT …… WHERE CONSTRAINT.TYPE= 'OWNER' AND
> CONSTRAINT.TYPE='FRESHNESS'….
> I don’t know what has led to the ‘AND’ keyword and that caused my
> query generated nothing at all.
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
>
>
> _______________________________________________
> d2rq-map-devel mailing list
> d2rq-map-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
d2rq-map-devel mailing list
d2rq-map-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to