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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:28:58+00:00 2026-05-31T07:28:58+00:00

EntityLoad with 1 argument is supposed to return all records in a table. However,

  • 0

EntityLoad with 1 argument is supposed to return all records in a table.

However, if I call it immediately after an EntityNew and EntitySave (which inserts a new record) that last record appears to be missing from the results.

I get the record back fine if I instead pass in a filter or if I call EntityLoadByPk. I realize one would probably not want to get a record just inserted within the same request, but I would still like to know what is going on here.

local.e = EntityNew("e");
local.e.setDescription("lorem ipsum");
EntitySave(local.e);
local.id = local.e.getId();

//fails to get record inserted above
dump(EntityLoad("e"));

//gets record inserted above successfully
dump(EntityLoadByPk("e", local.id));
  • 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-31T07:28:59+00:00Added an answer on May 31, 2026 at 7:28 am

    This has to do with Hibernate sessions and when the SQL to save an entity actually gets run. I am not an expert so its difficult to explain the ‘workflow’.

    One way I use to get around this issue is to wrap the entitySave() in a transaction.

    transaction{
        EntitySave(local.e);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am putting together a store finder which works on a radius from a
In a Rails controller action I call @grid = Grid.find(params[:id], :include => [:grid_properties, :grid_entities
I have a ColdFusion component that will return some JSON data: component { remote
First, the relevant bits of the table structure: contact -contactID -email data -value -contactID
Consider the fowling structure: CREATE TABLE [tblEntityLogs] ( [EntityLogId] [int] IDENTITY(1,1) NOT NULL, [EntityCountCurrent]
I am trying to do something that I thought was pretty basic but I
I've only just started out with CF9's ORM features, and have run into a
@PostLoad public void initThing() { ... } I added that to my entity but
I'd like to be able to save the value of an attribute without saving
I am setting up a project using Hibernate 3.3.1 GA and PostgreSQL 8.3 .

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.