Nope, like I said, if I copy the EXACT query output from the debug
like so:
<cfquery datasource="foo" name="add">
INSERT INTO users(email,password,accountType,customID,hash) VALUES
( '' , '' , 0 , 1474075992 , '' )
</cfquery>
And put i right below
user = instance.Transfer.new("users.user");
user.setCustomID(1474075992);
instance.Transfer.save(user);
Then two users are created. The one from Transfer has the wrong value
and the one from the direct query has the right value.
Like I said, the value from the debugging shows the sql CORRECT with
the correct values. But when checking the DB it's wrong. The insert
without Transfer shows IDENTICAL SQL in the debug and inserts
correctly.
On Jul 31, 8:09 pm, Mark Mandel <[email protected]> wrote:
> Transfer just runs a simple <cfquery> sql query.
>
> So if the SQL debug output is saying the right values are going in... I
> can't see what else can be done?
>
> I assume there are no triggers on the table, or the like?
>
> Mark
>
> On Sat, Aug 1, 2009 at 1:06 PM, whostheJBoss
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > Nope, it only shows up the one time. :\
>
> > The odd thing is that I also have a note field in the database table
> > for users (the table I'm inserting into) and if I set the value of the
> > notes field, which is VARCHAR, the value goes in correctly for that
> > field but incorrectly for the customID field.
>
> > user = instance.Transfer.new("users.user");
> > user.setCustomID(1474075992);
> > user.setNote(1474075992);
> > instance.Transfer.save(user);
>
> > In this case, the note value comes through correctly and the customID
> > value is wrong.
>
> > Nothing else happens after this save. So, when saving it puts in one
> > value fine and the other incorrectly. If I use the query directly
> > instead of Transfer, the insert works as expected.
>
> > On Jul 31, 11:23 am, Jennifer Larkin <[email protected]> wrote:
> > > That sounds like maybe the value is getting saved to the database by a
> > > second function. Does the inserted value show up elsewhere in the
> > > debug?
>
> > > On Fri, Jul 31, 2009 at 10:49 AM,
>
> > > whostheJBoss<[email protected]> wrote:
>
> > > > Ok, so some odd behavior...
>
> > > > When doing the insert via Transfer the debug shows:
>
> > > > Source C:\Program Files (x86)\Apache Software Foundation\Tomcat
> > > > 6.0\sites\foo\ROOT\transfer\com\sql\QueryExecution.cfc
> > > > Execution Time 0
> > > > Recordcount 0
> > > > Query INSERT INTO users(email,password,accountType,customID,hash)
> > > > VALUES ( '' , '' , 0 , 1474075991 , '' )
>
> > > > But the value in the database shows up as: 1474076030
>
> > > > If I copy and paste the query exactly and run it without Transfer like
> > > > this:
>
> > > > <cfquery datasource="foo" name="add">
> > > > INSERT INTO users(email,password,accountType,customID,hash) VALUES
> > > > ( '' , '' , 0 , 1474075992 , '' )
> > > > </cfquery>
>
> > > > The value is inserted correctly and the debug shows:
>
> > > > Source C:\Program Files (x86)\Apache Software Foundation\Tomcat
> > > > 6.0\sites\foo\ROOT\playground\insert.cfm
> > > > Execution Time 0
> > > > Recordcount 0
> > > > Query INSERT INTO users(email,password,accountType,customID,hash)
> > > > VALUES ( '' , '' , 0 , 1474075992 , '' )
>
> > > > So when inserting with Transfer the value gets inserted incorrectly,
> > > > but running the EXACT same query without Transfer inserts it fine.
>
> > > > Any thoughts???
>
> > > > On Jul 23, 1:17 pm, Mark Mandel <[email protected]> wrote:
> > > >> What does the SQL debug say for the values going into the Database?
>
> > > >> Mark
>
> > > >> On Fri, Jul 24, 2009 at 3:04 AM, whostheJBoss <
> > [email protected]>wrote:
>
> > > >> > squeek! No ideas on this?
>
> > > >> > On Jul 16, 10:17 pm, whostheJBoss <[email protected]>
> > wrote:
> > > >> > > <object name="user" table="users"
> > > >> > > decorator="components.decorators.users">
> > > >> > > <id name="userID" type="numeric"
> > />
> > > >> > > <property name="customID" type="numeric"
> > > >> > column="customID"
> > > >> > > nullable="true" />
> > > >> > > <property name="note" type="string"
> > column="note"
> > > >> > nullable="true" /
>
> > > >> > > </object>
>
> > > >> > > My decorator has:
>
> > > >> > > <cfproperty name="customID" type="numeric" default="" />
>
> > > >> > > On Jul 16, 2:27 pm, Mark Mandel <[email protected]> wrote:
>
> > > >> > > > ..what is your config for you this object?
>
> > > >> > > > Mark
>
> > > >> > > > On Thu, Jul 16, 2009 at 10:48 PM, whostheJBoss
> > > >> > > > <[email protected]>wrote:
>
> > > >> > > > > I am doing the following:
>
> > > >> > > > > user = instance.Transfer.new("users.user");
> > > >> > > > > user.setCustomID(rc.customID);
> > > >> > > > > user.setNote(rc.customID);
>
> > > >> > > > > The value of rc.customID is 1474075992
>
> > > >> > > > > When I check my database, the note field, VARCHAR(45), is
> > shown
> > > >> > > > > correctly as: 1474075992
>
> > > >> > > > > But the customID field which is BIGINT(20) is shown as:
> > 1474076030
>
> > > >> > > > > Any idea what is going on here? I am inserting the same value
> > into
> > > >> > > > > both.
>
> > > >> > > > > I've tried INT and BIGINT.
>
> > > >> > > > > When I check user.getCustomID() the value is correct as:
> > 1474075992
>
> > > >> > > > > What would be the proper type for my database field for this?
> > I need
> > > >> > > > > numeric, not VARCHAR.
>
> > > >> > > > > I am using MySQL 5 with an innoDB table.
>
> > > >> > > > > Thanks!
>
> > > >> > > > --
> > > >> > > > E: [email protected]
> > > >> > > > T:http://www.twitter.com/neurotic
> > > >> > > > W:www.compoundtheory.com
>
> > > >> --
> > > >> E: [email protected]
> > > >> T:http://www.twitter.com/neurotic
> > > >> W:www.compoundtheory.com
>
> > > --
> > > "Nothing says mother's love like a giant robotic platypus butt!"
> > > Phineas and Ferb
>
> > > Now blogging....
> >http://www.blivit.org/blog/index.cfmhttp://www.blivit.org/mr_urc/inde...
>
> --
> E: [email protected]
> T:http://www.twitter.com/neurotic
> W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---