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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:36:32+00:00 2026-05-28T19:36:32+00:00

For a project I am working on, I have to use the LastEdited field,

  • 0

For a project I am working on, I have to use the LastEdited field, combined with some other data, to infer some information about the DataObject in question. This is fine most of the time, since the LastEdited field is almost always a sane value under normal circumstances.

However, when trying to unit test my code, I run into the problem that despite setting a LastEdited field in my fixture, when the data gets loaded into a temporary database, it sets the LastEdited field to the current time.

My current assumption (somewhat backed up by some initial spelunking into sapphire) is that calling DataObject::write() automatically sets the LastEdited to the current time (expected behaviour).

My question is whether or not there is a way to temporarily disable this functionality, or will I have to patch sapphire to do this?

UPDATE I decided that being able to set the last edited value from the fixture was useful and did the patch. Good news, it’ll be in the next release of silverstripe

  • 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-28T19:36:33+00:00Added an answer on May 28, 2026 at 7:36 pm

    I will answer my own question, since it makes life easier.

    This is a known bug that will be fixed Silverstripe 3.0.

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

Sidebar

Related Questions

I have a working project that Im amending, it crashes after trying to use
I'm working on a project where i have to use dojo (i'm doing a
I'm working on a project that i have to use ruby 1.8.7. I'm using
I’m working on MVC project and I have to use web forms control there.
I have been working on a web services related project for about the last
It’s been days that I’m working on a project which I have to use
I'm currently working on a project where I have to use RenderScript, so i
I have started working on Opencl for a project. I have wanted to use
I am currently working on an Android project where I'd have to use maven.
I have to use Drupal for a project I will be working on. Do

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.