Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with the generated code for many to one property #23

Open
jmarq143 opened this issue Aug 6, 2020 · 0 comments
Open

Problem with the generated code for many to one property #23

jmarq143 opened this issue Aug 6, 2020 · 0 comments

Comments

@jmarq143
Copy link

jmarq143 commented Aug 6, 2020

I have this generated code for a table called products created by the ES 2019 studio.
The table products has a many to one relationship with a table called categories.

I want to be able to access the name of the category from product.
So I am doing product.categories.category_name
But when I step through the code in the generated file:, I never seem to reach the part where it loads the Categories.

The generated code in 2019 looks like this:

image

Is this a bug? Is there some other way I need to be doing this?

I think the problem is with this line:
if(this._Categories == null && CategoryId != null)

image
This is causing it to never go in to that if block since we have already initialized this._Categories just before that:
this._Categories = new Categories();

In 2009 version it used to work fine.
The code in 2009 like this:
image

Please let me know if anyone have any solution for this. Thank you!

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

No branches or pull requests

1 participant