forked from jayallen/melody
-
Notifications
You must be signed in to change notification settings - Fork 36
Object Asset Table
mikert edited this page Feb 24, 2011
·
1 revision
MT::ObjectAsset
This object serves as a look up table for object-asset mappings.
-
objectasset_id
-integer not null auto_increment
- The primary key. -
objectasset_blog_id
-integer
- The blog where the association has been made. -
objectasset_object_id
-integer not null
- The ID of the object associated with a particular asset. -
objectasset_object_ds
-string(50) not null
- The data source of the object in the association. This is the name of the object's table, minus the "mt_" prefix. -
objectasset_asset_id
-integer not null
- The ID of the asset in the association. -
objectasset_embedded
-boolean
- A boolean flag which shows whether or not this asset has been embedded into the object. Mainly used with entries and pages.
-
mt_objectasset_blog_obj
- columns:objectasset_blog_id
objectasset_object_ds
objectasset_object_id
-
mt_objectasset_id_ds
- columns:objectasset_object_id
objectasset_object_ds
mt_objectasset_asset_id
SELECT
entry_title, asset_label
FROM
mt_entry e
JOIN
mt_objectasset oa
ON
e.entry_id = oa.objectasset_object_id
AND
oa.objectasset_object_ds = 'entry'
JOIN
mt_asset a
ON
a.asset_id = oa.objectasset_asset_id