-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Using reflection on Proxy object
PostPosted: Thu Jul 07, 2005 9:35 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
I have a object set to lazy, it will actually generate a proxy object for me.

Then my code make sure the proxy object is initialized.

Then I want to use reflection: obj.GetType().GetProperty(...) to deal with the properties of that object. I got this exception.
Code:
System.Reflection.AmbiguousMatchException: Ambiguous match found.


I think proxy should be a sub-class of the real object, there should not be problem for me to get the properties. Is this dynamic-proxy has some tricky way to override the property, so that when I use reflection on the object, it actually contain Ambiguous properties?

Any Reflection expert Please help


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 01, 2005 11:10 am 
Beginner
Beginner

Joined: Wed Jun 29, 2005 10:40 am
Posts: 30
Location: denver, co
Have you marked all properties as virtual in your persistent class?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.