But doesn't that defeat the purpose of an inheritance structure if the base
class has to have all the members of all the derived classes? Also this
works fine if I disable Envers which leads me to believe this is an envers
bug.
On Monday, November 2, 2015 at 11:08:14 PM UTC-5, JideO wrote:
>
> Hi Jeffrey,
>
> It looks like your abstract project base class does not have a definition
> for the LinearFeetPermitted property, it has a LinerFeetEstimated property
> though.
>
> You introduced the LinearFeetPermitted property in some subclasses:
> Tier1Project & Tier2Project. These properties will not be members of the
> proxy generated based on the base project class.
>
> I think this missing property may be the problem here. The solution would
> be to introduce the LinearFeetPermitted on the base class.
>
> Regards,
>
> Jide Ogundipe
>
> On Sunday, November 1, 2015 at 5:49:10 PM UTC+1, Jeffrey Becker wrote:
>>
>> I'm receiving an error which I don't understand when trying to save my
>> Project entity. The Project class is an abstract base class which has a
>> bunch of basic functionality and several concrete implementations.
>>
>> My method:
>>
>> public void Handle(ProjectChanged message)
>> {
>> using (var tx = _session.BeginTransaction())
>> {
>> var project = _session.Get<Project>(message.ProjectId);
>> var conflictingLocationStubs = GetConflictingLocationStubs(
>> project);
>>
>>
>> ResolveRemovedConflicts(conflictingLocationStubs, project);
>> UpdateExistingConflicts(conflictingLocationStubs, project);
>> AddNewConflicts(conflictingLocationStubs, project);
>> UpdateConflictedStatus(project);
>> tx.Commit();
>> }
>> }
>>
>>
>> This code finds other projects in the database with conflicting locations
>> and adds/updates/removes Conflict records appropriately. This code
>> produces an error:
>> NHibernate.PropertyNotFoundExceptionCould not find a getter for property
>> 'LinearFeetPermitted' in class 'ProjectProxy'
>>
>> I'm perplexed because the code itself only ever operates on the base
>> project class. Do I have to call Get against the concrete implementation
>> classes or something?
>>
>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.