func (p *Post) NewMetaData() *PostMetaData {
	return &PostMetaData{
		Post: p,
	}
}
NewMetaData creates a new MetaData wrapper from a post
This sould be the only way new meta data objects are created!
package models
import (
	"time"
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/orm"
)
const ItemIDLength = 11
type PostType string
const (
	PostTypeImage = PostType("image")
	PostTypeText = PostType("text")
	PostTypeLink = PostType("link")
)
type Post struct {
	Id string `orm:"pk;size(11)"`
	User *User `orm:"rel(fk);null;on_delete(do_nothing)"`
	Date time.Time `orm:"auto_now_add"`
	Title string
	Content string
	Type PostType
	Topic *Topic `orm:"rel(fk);null;on_delete(do_nothing)"`
}
func ReadPost(id string, loadRelated bool) (*Post, error) {
	p := Post{Id: id}
	return &p, p.Read(loadRelated, "id")
}
func Posts() orm.QuerySeter {
	var table Post
	return orm.NewOrm().QueryTable(table)
}
func (p *Post) Insert() error {
	_, err := orm.NewOrm().Insert(p)
	return err
}
func (p *Post) Delete() error {
	_, err := orm.NewOrm().Delete(p)
	return err
}
func (p *Post) Read(loadRelated bool, fields ...string) error {
	o := orm.NewOrm()
	if err := o.Read(p, fields...); err != nil {
		return err
	}
	if loadRelated {
		if _, err := o.LoadRelated(p, "user"); err != nil {
			return err
		}
		if _, err := o.LoadRelated(p, "topic"); err != nil {
			return err
		}
	}
	return nil
}
type PostList []*Post
type PostMetaDataList []*PostMetaData
func (p *PostList) ToMetaData() *PostMetaDataList {
	metas := make(PostMetaDataList, len(*p))
	for i, post := range *p {
		metas[i] = post.NewMetaData()
	}
	return &metas
}
func (p *PostMetaDataList) ReadVoteData(u *User) error {
	for _, i := range *p {
		if err := i.ReadVoteData(u); err != nil {
			return err
		}
	}
	return nil
}
type PostMetaData struct {
	*Post
	Votes    int
	Rank     float64
	VoteDir  VoteDirection
	Comments []*CommentMetaData
}