Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:13:44+00:00 2026-06-15T11:13:44+00:00

I am using EF 4 (database first, model fully generated from it) with an

  • 0

I am using EF 4 (database first, model fully generated from it) with an oracle 10g database and I have a problem with one field.

My field is defined as a NUMBER(5) in my database. In my model, EF has defined it as a short.
My problem is that i have some values that are greater than 32,767 (max of a short)
I found this post : Entity Framework generates short instead of int. I follow the instruction and it works, my model contain now Int32 values.

But I have a new problem :

Error 2019: Member Mapping specified is not valid. The type 'Edm.Int32[Nullable=True,DefaultValue=]' of member 'XX' in type 'Model.XXX' is not compatible with 'OracleEFProvider.number[Nullable=True,DefaultValue=,Precision=5,Scale=0]' of member 'XX' in type 'Model.Store.XXX'.

This error is always show in the Error List tab of Visual Studio. However, the build success, and it half works:

  • read a value in database works
  • write a value do not work : 99999 was transformed in -31073 (see edit)

Is there a solution to have it works on both ways ?

BTW, is there any way to tell entity to use int32 for oracle INTEGER fields ? It use decimal by default.

EDIT

While debuging step by step, I found why my value was -31073. I forgot this line :

dao.Value = (short)dto.Value;

My two values were int, but the implicit conversion in short was the origin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:13:45+00:00Added an answer on June 15, 2026 at 11:13 am

    I found how to remove the error.

    I edited the edmx file in xml mode, found my field in the ssdl section :

    <Property Name="SIT_INSEE" Type="number" Precision="5" />
    

    I removed the Precision="5" and the warning disappeared.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i have a database first EF5 model defined. My user table has a
I am using Database First EF to generate model from the existing database. When
I am creating a new database model using Entity Framework 4.3 Code-FIrst; using Fluent
I'm new to Entity Framework and am using Database First. I have inherited a
I'm using the Code First approach to build the database in this problem. I
I'm using Entity Framework 4. I am using a database first model, meaning that
So I have a database and have created a model from it. Everything works
What are the pros & cons of using Entity Framework 4.1 Code-first over Model/Database-first
I've created a database using the EF4 model-first approach. In my model, there's an
I have an object model that I want to store using an embedded database.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.