2013-09-24 39 views
1

我試圖使用Visual Studio 2012和Oracle 10g創建Entity Data Model。 我得到這個錯誤:類型不準確性

Error 1 Running transformation: The types of all properties in the Dependent Role of a referential constraint must be the same as the corresponding property types in the Principal Role. The type of property 'QUARTAL_SEC_ID' on entity 'Model.QUARTAL' does not match the type of property 'SEC_ID' on entity 'Model.SEC' in the referential constraint 'FK_QUARTAL_SEC_ID'.

事實上sec_idnumber(32)quartal_sec_id - number(10)在數據庫中。我無法在那裏改變它。 我在VS12int32的映射細節中改變了這兩種類型。但它沒有幫助。 在VS12中可以解決這個問題嗎?我可以強制它接受外鍵中的不同值嗎?

我不能映射號(10)(ORA)爲十進制(VS)的事業會得到額外的錯誤:

Error 2 Error 2019: Member Mapping specified is not valid. The type 'Edm.Decimal[Nullable=False,DefaultValue=,Precision=,Scale=]' of member 'QUARTAL_SEC_ID' in type 'Model.QUARTAL' is not compatible with 'OracleEFProvider.number[Nullable=False,DefaultValue=,Precision=10,Scale=0]' of member 'QUARTAL_SEC_ID' in type 'Model.Store.QUARTAL'.

+0

在你的應用程序配置中你有什麼設置爲 ...? – ckross01

回答

0

我目前使用EF 5與Oracle和號碼類型,我們有我們的實體屬性設置爲小數。

這個article概述了數據類型。