IndexedDB and Relationships

Posted by Josh Johnson on Stack Overflow See other posts from Stack Overflow or by Josh Johnson
Published on 2011-07-05T18:00:27Z Indexed on 2011/11/15 1:51 UTC
Read the original article Hit count: 157

Filed under:
|

Can I create relationships between my object stores in IndexedDB?

For example, I have two object stores: artist and album. An artist has a one-to-many relationship with an album. album.artistId relates the album to artist.id.

I'm thinking along the lines of Hibernate here. I would like to do a query for artists and have the albums belonging to that artist returned as an array called artists on the album object.

artist.albums = [];

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about indexeddb