Could someone help me out by showing me how to map these two types :
case class forumQuote(
index: Int,
startOffset: Int,
endOffset: Int,
isDirect: Boolean,
quotedId: Int)
case class forumQuotes(quotes: List[forumQuote])
represented in postgres As :
CREATE TYPE forum_quote AS
(
index INTEGER,
q_start_offset INTEGER,
q_end_offset INTEGER,
is_direct BOOLEAN,
quoted_id INTEGER
);
Used as a array field in
CREATE TABLE forum_posts
(
...
quotes forum_quote [],
...
)
Used in my own lifted table as :
object ForumPosts extends Table[...] {
...
def quotes = Column[forumQuotes]("forum_quotes")
...
}
Note: I prefer not see any use of JDBC arrays since I need to do some funky stuff with hstore later on (Key[String] => Value[Array[T]]) where T is a postgresql record.