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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:54:42+00:00 2026-06-11T13:54:42+00:00

On an already in place table in the database we are trying to Add

  • 0

On an already in place table in the database we are trying to Add a column for the CreationDate

mapping.Map(x => x.CreationDate)
            .Not.Nullable()
            .Default("to_date('01-01-0001','dd-MM-yyyy')")

This works perfectly fine with oracle but SQLite will not understand this, which is perfectly normal because it does not know the to_date() function.

If i use

DateTime.MinValue.ToString()

for the Default value with or without an specific format. Then it will work in SQLite but it wont work in Oracle.

Does someone know a solution to solve this.

  • 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-11T13:54:43+00:00Added an answer on June 11, 2026 at 1:54 pm

    leave out the defaultvalue and write a convention

    class CreationDateConvention  : IPropertyConvention
    {
        public CreationDateConvention(string default)
        {
            _default = default;
        }
    
        public void Apply(... instance)
        {
            if (instance.Name == "CreationDate")
                instance.Default(_default)
        }
    }
    
    
    // and while configuring
    ...FluentMappings.AddFromAssemblyOf<>().Conventions.Add(new CreationDateConvention(isOracle ? "to_date..." : Datetime.Minvalue.ToString())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with a database that is already in place and used by
If my question has already taken place in other post, please excuse me. I
There are already jQuery based Edit in place plug ins available. But i am
I'm trying to modify the text of a Label component that I already placed
We already have the database with real data inside. Now we want to build
I guess many people already read this article: Using your own SQLite database in
I'm trying to input some data into a PostgreSQL 8.4 database with a PostGIS
Sorry if this is the wrong place, but I'm not sure what Stack Exchange
I'm having an issue with LINQ2Sql where the value in the database is not
I am using PostgreSQL database. Having a table named metadatavalue with structure is as

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.