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

  • SEARCH
  • Home
  • 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 8415821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:33:29+00:00 2026-06-10T01:33:29+00:00

I wrote a simple test program which will access the default HR model on

  • 0

I wrote a simple test program which will access the default HR model on an Oracle Express in direct mode using DevArt dotConnect for Oracle v. 6.8.0.350:

using (var ctx = new HREntities())
{
    var locNew = new LOCATION();
    locNew.CITY = "Magdeburg";
    ctx.LOCATIONs.AddObject(locNew);
    ctx.SaveChanges();
    // will output 0; in database ID is generated
    Console.WriteLine(locNew.LOCATIONID);
}

As you can see I’m doing an insert into the LOCATION table. Here I added a trigger:

create or replace
trigger TRG_LOCATION_INS  
   before insert on "HR"."LOCATIONS" 
   for each row 
begin  
   if inserting then 
      select LOCATIONS_SEQ.nextval into :NEW."LOCATION_ID" from dual;       
   end if; 
end;

Last step was setting StoreGeneratedPattern in my model to Identity (yes, I checked if it is written to the XML).

If I run the test-app, the record is created and it has got a valid new LocationID. But in EF the new ID will not arrive.

Why isn’t it recognizing the generated ID? If yes, what does that mean: DevArt Blog

EDIT: I tested it in different scenarios now:

  1. devArt EntityModel in Direct Mode
  2. devArt EntityModel with OracleClient
  3. ADO.NET EntityModel with OracleClient

The result is the same. No DSID is returned on SaveChanged. As another result, if I write

ctx.Refresh(RefreshMode.ClientWins, log);

an InvalidOperationException will raise saying, that there is now entity with key ‘0’ which is correct but not helpful :-(.

  • 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-10T01:33:31+00:00Added an answer on June 10, 2026 at 1:33 am

    If you look in the .edmx file you see there is a conceptual schema and a storage schema defined. If you change the StoreGeneratedPattern in the designer, it will only change it in the conceptual schema, but not in the storage schema, which is really necessary.

    The StoreGeneratedPattern is in the designer for model-first development, if you generate the database from the model, else it doesn’t have effect. So you have to manually insert the attribute in the storage schema.

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

Sidebar

Related Questions

I wrote a simple program to test a theory that finally block will always
I wrote a very simple program named test.py which looks like this: print 'hello
I wrote a simple test program for opencv to see if it's working after
I wrote a simple program with java swing which suppose to start another thread
I am Ubuntu 10.04 user and I wrote a very simple program, which I
I wrote an XML RPC server in python and a simple Test Client for
A couple of weeks ago, I wrote a simple Ruby script to test a
I have a simple program which I have compiled in both MinGW and Visual
I want to create a test program about using socket. First i need to
I'm looking to write a small program which will intercept network packets (on the

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.