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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:50:04+00:00 2026-05-29T23:50:04+00:00

A common design I use is to set a date column with the current

  • 0

A common design I use is to set a date column with the current date as the default. For SQL Server I use getDate() and for MySQL now() or current_timestamp.

Implementing a MySQL solution in ORM, seemed the way to do it would be:

property name="dtSaved" ormtype="date" dbdefault="now()";

However, this isn’t working, but isn’t throwing an error either. When I run ORMReload(), it seems to get stuck on this table, and none of the entities that come after (alphabetically) get created. (I’m using dbcreate=”dropcreate”)

Note that this is Railo 3.3.1, not Adobe ColdFusion 9.

  • 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-29T23:50:07+00:00Added an answer on May 29, 2026 at 11:50 pm

    You can set a dynamic default value in your constructor, so something like this:

    component persistent="true" {
    property name="measurementDate" ormtype="date";
    function any init(){
    if (IsNull(variables.measurementDate)){
    variables.measurementDate = Now();
    }
    return this;
     }
    }
    

    Comment by John Whish – November 22, 2010

    from:
    http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/coldfusion-9-orm-example-215

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

Sidebar

Related Questions

What are some of the more common design patterns used when developing 3D games?
Data Access Objects (DAOs) are a common design pattern, and recommended by Sun. But
A common web UI design is to display a sortable grid (GridView, ListView, DataGrid)
Common question but I could use an english explanation. Is it like Java where
Common situation: I have a client on my server who may update some of
Would using the adapter pattern be the best design to use when all you're
it seems to be a common practice to use a div with a class
I'm trying to come up with a good design for converting a set of
I'm trying to find a design pattern I can use to simplify the construction
Design patters are a point of arguments between developers, but I use them very

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.