Relationship between Orchard entities

Topics: Customizing Orchard, Writing modules
Oct 27, 2011 at 2:49 AM

Because there doesn't appear to be any documentation for the Orchard logical entity relationships, I am trying to guess at how certain tables are related.

Can anyone tell me what the relationship is between Orchard_Framework_ContentTypeRecord (CTR) and Settings_ContentTypeDefinitionRecord (CTDR)?

I have created a new content type. Let's call it "ProductType"

In CTR, "ProductType" has an ID of 17 but in CTDR, it has an ID of 13.

Also, If I wanted to see the body text for all "ProductType" content items, would the following query be correct:

select * from 
dbo.Orchard_Framework_ContentTypeRecord ctr 
inner join Orchard_Framework_ContentItemRecord cir 
    on = cir.ContentType_id
inner join Common_BodyPartRecord bpr 
    on =
where = 17

Thanks in advance.

Oct 28, 2011 at 6:23 PM

I think it's by name, not by id.