- 0
[C#] NHibernate
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Windows 11 24H2 RTM build off to rocky start with broken virtualization, 64-bit .NET support
By hellowalkman,
- vmware
- micrsosoft
- (and 12 more)
- 20 replies
- 2 views
-
- 0 replies
- 2 views
-
- 2 replies
- 5 views
-
Microsoft announces .NET 8 Preview 1, available to download today
By Chasethebase,
- 1 reply
- 4 views
-
- 3 replies
- 5 views
-
Question
SuperKid
Hi,
I can't seem to get my code to work with NHibernate properly, what I am trying to do is Inherit my Database Entities into my classes, so i have it like this:
and
but in nHibernate if i do say session.Save(SomeClass); it doesn't work? it says there is no persister for "SomeClass" it seems to not understand that "DbEntity" which is Inherited is what needs to be used here, I have classes which include data I want to retrieve, save and update from my database using Hibernate but these classes are Inherited like deep down, but why won't Hibernate accept "SomeClass" and just cast it to DbEntity and work out what it needs??
Thanks!
EDIT: When i mean't .Save(SomeClass); i mean if i do like
Link to comment
Share on other sites
4 answers to this question
Recommended Posts