Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

JSOG does not work with cyclic dependencies due to typescript / reflect-metadata resolution order #8

Open
edwinquaihoi opened this issue Jan 15, 2018 · 5 comments
Labels

Comments

@edwinquaihoi
Copy link

The following issue affects jsog-typescript microsoft/TypeScript#4521

@edwinquaihoi edwinquaihoi changed the title JSOG does not work with cyclic dependencies due to typescript resolution order JSOG does not work with cyclic dependencies due to typescript / reflect-metadata resolution order Jan 15, 2018
@edwinquaihoi
Copy link
Author

Hi I have a solution for the problem but it requires a change that is not backward compatiable, let me know if you would like to share it

@simonnagl simonnagl added the bug label Feb 20, 2018
@simonnagl
Copy link
Member

Hi @edwinquaihoi,

sorry for my late answer. If you have a fix for the problem you can (of course) open a pull request if you like. I cannot reproduce the problem yet because you did not provide an example. Looking forward for your PR!

@nsoft
Copy link

nsoft commented Mar 1, 2020

@edwinquaihoi I think I've run into this too (same object held in sub-array is coming up as an independent object... which then causes hibernate to complain that I'm persisting the same object twice) do you still have your solution?

@simonnagl
Copy link
Member

Hi @nsoft ,
can you please clarify what you mean with same object held in sub-array?

If I can reproduce this bug I might also be able to fix it.

@nsoft
Copy link

nsoft commented Mar 23, 2020

I worked around this by invoking the Javascript JSOG library in Angular instead of this one. I don't exactly recall, but basically I had an object with a list, and one of the objects in the list had a reference to the parent, but was fully rendered and thus the object was re-created instead of referenced.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants