Skip to content

Fix determination of interface proxies #2070

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

Merged
merged 8 commits into from
Mar 24, 2019

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Mar 19, 2019

The logic determining if we have an interface proxy or not moved to the tuplizer.

Fixes #2067

Change invocation of IProxyFactory.PostInstantiate to pass correct base
class depending on the set interface proxy
@hazzik hazzik marked this pull request as ready for review March 19, 2019 09:28
@hazzik

This comment has been minimized.

@hazzik hazzik changed the title Fix base type for interface proxies Fix detection of interface proxies Mar 19, 2019
@hazzik hazzik changed the title Fix detection of interface proxies Fix determination of interface proxies Mar 19, 2019
@bahusoid
Copy link
Member

I think tests for this PR better to place in StaticProxyTest folder/subfolder.

@hazzik
Copy link
Member Author

hazzik commented Mar 20, 2019

I'm going to drop @bahusoid's tests as I believe the existing test cases do cover the required cases.

public void PostInstantiate(string entityName, System.Type persistentClass, ISet<System.Type> interfaces,
MethodInfo getIdentifierMethod, MethodInfo setIdentifierMethod,
IAbstractComponentType componentIdType)
{
//6.0 TODO: throw NotSupportedException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange TODO inside obsolete method. Shouldn't we simply drop this method in 6.0? And when obsoleting something we also tend to add //Since 5.3 comment

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s not strange. This method would stay on the class (with additional argument) because of the interface, but shall not be supported.

Yeah, I’ve forgot about “since 5.3”

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not so obvious that new override is meant. But why don't add override now?

@bahusoid
Copy link
Member

Regarding dropping my tests. I'm fine wit it - I've added them with the wrong idea for "interface proxy" work. So they are at least excessive. But I still think that tests should be moved to StaticProxyTest

@fredericDelaporte fredericDelaporte added this to the 5.3 milestone Mar 24, 2019
@fredericDelaporte fredericDelaporte merged commit c8b9ae6 into nhibernate:master Mar 24, 2019
@hazzik hazzik deleted the gh-2067 branch October 5, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants