3

I need to query the components based on a particular schema and I tried to use both SchemaTitle as well as ItemSchema criteria for same but I am not getting any results. I have published DCPs and having entry of my schema in schema table and have an entry in Component and CP tables as well. Any help will be appreciated. I am using Tridion 2013 SP1 code snippet is below: enter image description here

enter image description here

  • Your code looks correct. Are the components published to the correct CD target? Also, are they published from the publication you're querying, I.e. 55? – Nickoli Roussakov Aug 22 '14 at 12:48
  • Yes Nickoli, I checked the Broker DB as well as Storage config. If I am directly fetching a CP for a component with same schema then its getting fetched. But Criteria code is not working. While Querying , the Criterias are coming as null and hence its giving null results. There is no error coming. – user918 Aug 22 '14 at 15:53
  • 1
    At this point I would enable SQL logging with Hibernate and see what the DB query is being generated. Then I would run the DB query directly via SQL Manager and see what's in the query regarding schema where it includes the schema id/name (eliminate conditions in the WHERE clause until you find the culprit), and this should give you a hint on what's going wrong. Here is how to enable sql logging: tridion.stackexchange.com/a/3448/159 – Nickoli Roussakov Aug 22 '14 at 22:13
  • It was a storage config issue. Thanks for help Nickoli. – user918 Aug 24 '14 at 12:12
  • Can you share the details of what was wrong in your config as an Answer to this question so that we can close the case? – Nickoli Roussakov Aug 25 '14 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.