4

Here's some real strange stuff. Railo 4.2.2 (latest/bleeding edge). Create a user, persist, flush and then query the db via sql and ORM:

<cfset u = var user = new com.sharp.model.user.User({username: "admin", password: hash("p@ssw3rd"), isAdmin: true})>

<cfset entitySave( u )>
<cfset ormFlush()>
<cfquery name="foo">
    select *
    from user
</cfquery>
<cfdump var="#foo#" />
<cfdump var="#ormExecuteQuery('from User')#" />

And here's what I see:

enter image description here

What is up with that? Reloading the page adds another one to the array, so it's saving it somewhere, but not in my dsn??

ORM settings from App.cfc?

this.datasource = 'rrm';
this.ormSettings = { cfclocation: ormPaths, logSQL: false, flushAtRequestend: false, eventHandling: true, saveMapping: false, dbCreate: 'update', secondaryCacheEnabled: false };
Carl Von Stetten
  • 1,149
  • 8
  • 13
Todd Sharp
  • 3,207
  • 2
  • 19
  • 27
  • Something in Railo bleeding edge release was causing this (very strange) issue. I rolled back the patches and it's working fine. – Todd Sharp Dec 08 '14 at 02:15
  • Todd, did you raise a bug for this? I'm seeing it too. – Adam Cameron Jan 01 '15 at 17:55
  • Ah, found it: https://issues.jboss.org/browse/RAILO-3273 – Adam Cameron Jan 01 '15 at 17:57
  • Tood, see my answer to your previous question http://stackoverflow.com/questions/27337983/fw-1-app-calling-onapplicationstart-on-every-request/27447340#27447340 The changes are being made within the ORM session hence you can see them, but are not being flushed to the DB. Definitely a regression bug. With other consquences too: https://groups.google.com/forum/#!topic/railo/7OKejFpq4PA – CfSimplicity Jan 01 '15 at 20:37

0 Answers0