Is it possible to inherit from EntitySet?

I just tried creating AddressSet : EntitySet

... after adding some entities to the set, calling Addresses.ElementAt(0) throws an exception.

If I change the type of the property from AddressSet to EntitySet

, there is no exception.

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Nov 25 '09 at 08:41

ara's gravatar image

ara
395878791

Hello,

Yes, EntitySet<t> class is intentionally inheritable. Thanks for the bug report, we'll check the issue asap.

(Nov 25 '09 at 08:41) Dmitri Maximov Dmitri%20Maximov's gravatar image
(Nov 25 '09 at 08:41) Dmitri Maximov Dmitri%20Maximov's gravatar image

Definitely a bug.

P.S. Providing the stack trace might help a lot in such cases.

(Nov 25 '09 at 08:41) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Alex Gamzov (Xtensive) wrote:

Is it possible to inherit from EntitySet? I just tried creating AddressSet : EntitySet

... after adding some entities to the set, calling Addresses.ElementAt(0) throws an exception. If I change the type of the property from AddressSet to EntitySet
, there is no exception.

Hello. I tried to repeat this error, but everything works OK for me. Could you help me a little bit? To repeat the bug I need: 1. Your model. 2. Code of AddressSet class 3. Code there you add entities to AddressSet and call ElementAt method. 4. Exception message and stack trace.

Thank you.


Alex (Xtensive) wrote:

Your issue: http://code.google.com/p/dataobjectsdot ... ail?id=485

Likely, it is fixed, since I just fixed a related issue: http://code.google.com/p/dataobjectsdot ... ail?id=493

Please approve if problem is eliminated.


Alex (Xtensive) wrote:

Repository @ Google Code already contains the fix: http://code.google.com/p/dataobjectsdot ... 414f65100b

answered Nov 26 '09 at 09:10

Editor's gravatar image

Editor
46156156157

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA