Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 15412)
+++ wp-includes/post.php	(working copy)
@@ -539,6 +539,94 @@
 }
 
 /**
+ * Get a post object's property while being agnostic about its database location.
+ *
+ * @since 3.1.0
+ * 
+ * @param int $object_id The ID of the object for which to get the property.
+ * @param string $prop_name The name of the property to get.
+ * @param bool $force_single Optional, default is false.  If true, return only the first value of the
+ * 		specified property even if multiples of that property exist. 
+ * @return mixed The object's property if set; null otherwise.
+ */
+function get_object_property( $object_id = 0, $prop_name = '', $force_single = false ) {
+	global $wpdb;
+	
+	$object_id = (int) $object_id;
+
+	if ( empty( $object_id ) || empty( $prop_name ) )
+		return null;
+
+	$post_object = get_post( $object_id );
+
+	if ( isset( $post_object->$prop_name ) ) {
+		return $post_object->$prop_name;
+	} else {
+		$metadata = get_post_meta( $object_id, $prop_name, $force_single );
+		if ( ! $force_single && is_array( $metadata ) && 1 == count( $metadata ) ) 
+			return array_shift( $metadata );
+		else
+			return $metadata;
+	}
+
+}
+
+/**
+ * Set a post object's property while being agnostic about its database location.
+ *
+ * @since 3.1.0
+ * 
+ * @param int $object_id The ID of the object for which to set the property.
+ * @param string $prop_name The name of the property to set.
+ * @param mixed $prop_value The value of the property to set.
+ * 	If $prop_value is NULL and is not a posts table field value, 
+ *	it will be deleted from the posts meta table.
+ * @return bool Whether the setting actually made a change.
+ */
+function set_object_property( $object_id = 0, $prop_name = '', $prop_value = false ) {
+	global $wpdb;
+
+	$object_id = (int) $object_id;
+
+	if ( empty( $object_id ) || empty( $prop_name ) )
+		return false;
+
+	$posts_db_fields = array(	
+		'comment_count',
+		'comment_status',
+		'guid',
+		'menu_order',
+		'pinged',
+		'ping_status',
+		'post_author',
+		'post_category',
+		'post_content',
+		'post_content_filtered',
+		'post_date',
+		'post_date_gmt',
+		'post_excerpt',
+		'post_mime_type',
+		'post_modified',
+		'post_modified_gmt',
+		'post_name',
+		'post_parent',
+		'post_password',
+		'post_status',
+		'post_title',
+		'post_type',
+		'to_ping',
+	);
+
+	if ( in_array( $prop_name, $posts_db_fields ) ) {
+		return $wpdb->update( $wpdb->posts, array( $prop_name => $prop_value ), array( 'ID' => $object_id ) );
+	} elseif ( null === $prop_value ) {
+		return delete_post_meta( $object_id, $prop_name );
+	} else {
+		return update_post_meta( $object_id, $prop_name, $prop_value );
+	}
+}
+
+/**
  * Register a post type. Do not use before init.
  *
  * A simple function for creating or modifying a post status based on the
