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 743005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:48:47+00:00 2026-05-14T08:48:47+00:00

I have primary key sequence for oracle in my Castle ActiveRecord class: [PrimaryKey(PrimaryKeyType.SeqHiLo, UserId,

  • 0

I have primary key sequence for oracle in my Castle ActiveRecord class:

[PrimaryKey(PrimaryKeyType.SeqHiLo, "UserId", SequenceName = "users_seq")]
public int Id { get; set; }

Now i need to configure ActiveRecord to use Sql Server, but it does not support sequences, but it’s not possible, since oracle-specific mapping is used.

I don’t care about identity-generation algorithm, i just want it to work, so is it possible to provide a general mapping for identity field, so the classes could be shared between sql server and oracle?

  • 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-05-14T08:48:47+00:00Added an answer on May 14, 2026 at 8:48 am

    You can use PrimaryKeyType.Native – it automagically chooses between SeqHiLo and HiLo depending on the database.

    Have a look at the docs for other srategies – most of them are database-independent.

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

Sidebar

Related Questions

I define a base class which have a Long primary key , just like
I have a simple SQLite table called message: sequence INTEGER PRIMARY KEY type TEXT
I have a JPA entity class with a composite primary key (uid,lid) that in
I have an entity defined with a sequence-generated primary key: @Id @GeneratedValue(strategy = GenerationType.SEQUENCE,
I have this table in an Oracle DB which has a primary key defined
I have a primary key set up to auto increment. I am doing multiple
Is It Possible to have a primary key and auto increment key associated to
We have a composite primary key for the site table defined below. Functionally, this
I have six tables, which unfortunately does not have any primary/foreign key-relations encoded. I've
I'm creating a database table and I don't have a logical primary key assigned

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.