dbroudy / LazyEntityGraph

LazyEntityGraph is an open source library for .NET which lets you generate object graphs with circular dependencies, such as those found in ORMs, by lazily generating relationship properties.
MIT License
27 stars 12 forks source link

#17 Fixed incorrect constraint creation. #18

Closed azat-galiev closed 4 years ago

azat-galiev commented 4 years ago

Tested .NET Standart version on .NET Core app, don't have ability to test .NET Framework.

dbroudy commented 4 years ago

Thank you for reporting the issue and especially for the pull request. Would it be possible for you to add a unit test that reproduces this and verifies the fix?

azat-galiev commented 4 years ago

Sure :)

jzabroski commented 4 years ago

I guess this could happen in a TPH entity model?

azat-galiev commented 4 years ago

Sorry for long absence due to holidays. No, we don't use TPH in our model, each table contains only one type of class, but classes have some hierarchy. I haven't known about TPH before, so I need some time to research that my solution is suitable for TPH models.

azat-galiev commented 4 years ago

I haven't done yet, 1-2 days to complete.

azat-galiev commented 4 years ago

Once again, sorry for the long delay, I had too much work on my primary job. And sorry for a lot of cosmetic changes, it was hard for me to understand how everything works. PR is ready for the review :)

alexfoxgill commented 4 years ago

sorry, removing myself from review... i may have written the original code but haven't maintained or used the library (or even used C#) for several years now!

dbroudy commented 4 years ago

@GaryFreeman Before I look through all of these changes, it seems like a pretty extensive change for one issue. Is it all required for this change, or are there some other things in here?

azat-galiev commented 4 years ago

@dbroudy There is a lot of minor changes in code style I made while trying to find the solution. I can clean up the PR to keep only important changes.

azat-galiev commented 4 years ago

@dbroudy I've removed all redundant code, but there is still a lot of changes, mainly in test projects. Let's freeze the code, you can start reviewing.

azat-galiev commented 4 years ago

Hi @dbroudy! Do you have any news?