coresmart / persistencejs

persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
http://persistencejs.org
1.73k stars 240 forks source link

Fetch inverse hasOne #167

Open dtelaroli opened 9 years ago

dtelaroli commented 9 years ago

How to fetch inverse hasOne relationship? This feature exists? A workaround? Can be implemented?

List
Share
Share.hasOne('list', List)

List.load(id, function(list) {
   list.share //returns object if exists or null if not exists
})