Closed IcarusComplex closed 5 years ago
Change one of your bean like this
MyBean _myBean;
MyBean get myBean => _myBean ??= MyBean(adapter);
Thank you @Elvis5566. This worked very nicely.
I recommend updating the OneToMany example code, as this implements it the way I had it above.
Seems an obvious fix now that I've seen. Thank you again!
Hello.
I'm having some issues when generating beans. These are my dependencies:
The scenario is as follows. I have a Bean, A, and a Bean B.
Pretty standard one to many relationship. In the setup above, if I attempt to instantiate any Beans I get a stack overflow as the constructors are calling one another. However, removing the reference to a
BBean
fromABean
has the unwanted result that the auto generated_ABean
expects a reference toBBean
in its generatedcreateTable
method to get the tableName ofBBean
. Its easy enough to edit the code manually, but I feel like this isn't a clean solution.Any way I can avoid this? Anything with my setup I need to change? Thank you!