Unable to cast to moved types

39 views
Skip to first unread message

Starfish

unread,
Jul 5, 2012, 4:36:53 AM7/5/12
to ravendb
Hello! I have a problem that may or may not be Raven specific.

I used to use a model included in my project to define documents in
RavenDB.

Recently i decided to separate the model into a separate project in
the same solution. The problem is that when I try to query the
database, the moved types don't get recognized and I get a cast
exception.

I imagine this is a pretty common problem. If someone could just point
me in the right direction.

Oren Eini (Ayende Rahien)

unread,
Jul 5, 2012, 4:38:30 AM7/5/12
to rav...@googlegroups.com
That is because you also have the old types.
If you removed them, it will work.

Starfish

unread,
Jul 5, 2012, 4:45:25 AM7/5/12
to ravendb
To quote Winston Smith,

I understand how but not why?

Oren Eini (Ayende Rahien)

unread,
Jul 5, 2012, 4:46:10 AM7/5/12
to rav...@googlegroups.com
You had:

Old.Item

You moved to:

New.Item

But you didn't delete Old.Item
Once you delete that, it will work 

Starfish

unread,
Jul 5, 2012, 5:01:41 AM7/5/12
to ravendb
But I removed the "using".

Oren Eini (Ayende Rahien)

unread,
Jul 5, 2012, 5:05:20 AM7/5/12
to rav...@googlegroups.com
It isn't the using, it is the fact that they _type_ still exists.

Starfish

unread,
Jul 5, 2012, 6:54:02 AM7/5/12
to ravendb
I see.
Reply all
Reply to author
Forward
0 new messages