ORM in TypeScript with couchDB local storage

Hi,
I’m building my Ionic2 app Models for local storage,

1- How can I do relational mapping with my Interfaces (complex Data models)

example:

interface User{
id: number;
team: Team; // I wouldn't have a complex object but a foreign key of object "team"
}

2 - How I’ll storage it in couchDB (I know that couchDB is a NoSQL Document DB!)

Thank you!

1 Like