Consider the following mapped classes:
public abstract class Content {}
public class Image : Content {}
Now, when trying to load an instance of an Image:
[...]
Guid imageId = GetId();
ISession sess = GetSession();
object loadedObj = sess.Load(typeof(Content), imageId);
object getObj = sess.Get(typeof(Content), imageId);
[...]
loadedObj.GetType().BaseType will be "Content" (unexpected).
getObj.GetType().BaseType will be "Image" (expected).
Why the difference between Get and Load? Is this a bug, or should I use ISession.Get to suit my needs?
With 1.0.1, ISession.Load would have returned an Image instance above.
Thanks!
Ryan
|