未映射的属性 [英] Unmapped Properties

查看:114
本文介绍了未映射的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我有一个非常奇怪的情况所以请耐心等待我解释。

I have a very strange situation so bear with me as I try to explain.

我们有一张桌子:table1

We have a table: table1

使用存储过程(函数映射)我们使用存储过程映射将数据加载到该表

using a stored proc (function mapping) we load data into that table

,我们使用另一个存储过程为更新功能。

using stored procedure mapping, we use another stored proc for the update function.

 

所以数据通过一个存储过程加载到实体中,并通过另一个存储过程更新。

so data is loaded into the entities via one stored proc and updated via another.

问题是我们只需要一些属性进行更新,所以我们不希望它们存在于表中,只是在实体中,然后我们在应用程序中为这些属性设置值。

The issue is that we need some properties only for updating so we dont want them to exist in the table, just in the entity and then we set values in the application for these properties.

 

当我手动将属性(property1)添加到int32类型的table1时,我得到以下内容:

When I manually add a property (property1) to table1 of type int32, I get the following:

错误   ;  2   错误3004:从第164行开始映射片段时出现问题:没有为Set table1中的属性table1.property1指定映射。

具有键(PK)的实体在以下情况下不会往返:

 实体是类型[PMSData_SchedulerModel.table1]

Error    2    Error 3004: Problem in mapping fragments starting at line 164:No mapping specified for properties table1.property1 in Set table1.
An Entity with Key (PK) will not round-trip when:
  Entity is type [PMSData_SchedulerModel.table1]

 

所以我的问题是,如何在一个虚拟类型或非映射属性中使用映射实体?

So my question is, how can I use a virtual type or non mapped property in a mapped entity?

或者有更好的方法吗?

 

感谢您的帮助

 

Nick

推荐答案

你有没有?永远解决这个问题? (我遇到了麻烦问题)....

Did you ever get this problem resolved? (I'm running into the smae issue)....

Joe


这篇关于未映射的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆