Warning: The magic method SFML_Singleton::__wakeup() must have public visibility in /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php on line 72

Warning: Cannot modify header information - headers already sent by (output started at /home/public/wp-content/plugins/sf-move-login/inc/classes/class-sfml-singleton.php:72) in /home/public/wp-includes/feed-rss2-comments.php on line 8
Comments on: Adding Vue reactivity to js-data relationships https://www.munderwood.ca/index.php/2018/05/16/adding-vue-reactivity-to-js-data-relationships/ Tracking the occasional random walk Mon, 27 May 2019 20:36:15 +0000 hourly 1 https://wordpress.org/?v=5.7.2 By: Doug https://www.munderwood.ca/index.php/2018/05/16/adding-vue-reactivity-to-js-data-relationships/#comment-2456 Mon, 27 May 2019 20:36:15 +0000 http://www.munderwood.ca/?p=256#comment-2456 It appears my issue is related to what you referenced above as as a possible infinite loop.

I do need to have vueReactive set as true on both sides of some relations. Have you looked any more into this? Any ideas where I should start with debugging?

]]>
By: munderwood https://www.munderwood.ca/index.php/2018/05/16/adding-vue-reactivity-to-js-data-relationships/#comment-2119 Fri, 08 Feb 2019 00:16:10 +0000 http://www.munderwood.ca/?p=256#comment-2119 That’s one that I haven’t encountered myself so far, but my first reaction (so to speak) is that if the relationship is not even found in js-data, then it’s really something to do with that, and not with Vue or its reactivity.

The only thing I can think of off the top of my head without seeing more code would be if the position is being created only in the front end, and not persisted somewhere that would assign it an id. That is, if you say const bossPosition = store.createRecord({ title: 'CEO' }) then bossPosition.id will be undefined (until after a call to bossPosition.save() resolves), so assigning bossEmployee.position_id = bossPosition.id won’t actually do anything…

]]>
By: Doug https://www.munderwood.ca/index.php/2018/05/16/adding-vue-reactivity-to-js-data-relationships/#comment-2117 Thu, 07 Feb 2019 20:12:04 +0000 http://www.munderwood.ca/?p=256#comment-2117 1st: I love it, thank you.

I’m having a small problem with a ‘belongsTo’ relationship if the object which it belongs to is not yet created when the object is created. i.e.

employee: belongsTo position
position: hasMany employee

If an employee is created before the position, the employee.position is forever ‘undefined’ and will not be reactive (or even found by jsData)

Any Ideas??? Thanks again

]]>