Hello -
Have you chek the data source name used in your transfer config ? This
problem seems to be database side, I would be surprised if transfer is
involved there...

Cheers,
Aurelien

2009/8/4 whostheJBoss <dotfus...@changethings.org>

>
> Ok, I've done more testing.
>
> I run the following:
>
> <cfscript>
> user = instance.Transfer.get("users.user", 42);
> user.setCustomID('1474075992');
> instance.Transfer.save(user);
> </cfscript>
>
> And the query in debug shows:
>
> Source  C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 6.0\sites\test\ROOT\transfer\com\sql\QueryExecution.cfc
> Execution Time  0
> Recordcount     0
> Query   UPDATE users SET email = '' ,password = '' ,accountType =
> 0 ,customID = 1474075992 WHERE userID = 42
>
> The value for customID in the database shows up as 1474076030
>
> If I run:
>
> <cfscript>
> user = instance.Transfer.get("users.user", 42);
> user.setCustomID('1474075992');
> instance.Transfer.save(user);
> </cfscript>
>
> <cfquery name="test" datasource="test">
> UPDATE users SET email = '' ,password = '' ,accountType = 0 ,customID
> = 1474075992 WHERE userID = 42
> </cfquery>
>
> The query debug shows:
>
> Source  C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 6.0\sites\test\ROOT\transfer\com\sql\QueryExecution.cfc
> Execution Time  0
> Recordcount     0
> Query   UPDATE users SET email = '' ,password = '' ,accountType =
> 0 ,customID = 1474075992 WHERE userID = 42
>
> Source  C:\Program Files (x86)\Apache Software Foundation\Tomcat
> 6.0\sites\test\ROOT\handlers\test.cfc
> Execution Time  0
> Recordcount     0
> Query   UPDATE users SET email = '' ,password = '' ,accountType =
> 0 ,customID = 1474075992 WHERE userID = 42
>
> And the value shows up correctly in the database as 1474075992
>
> So, the queries show up IDENTICAL except for the one run through
> Transfer inserts (or updates, in this case) the wrong value in the
> database!
>
> I am doing NOTHING else in my file. It is absolutely impossible that
> there is a duplicate insert or anything like that. This site has 1
> handler with 1 method and you're looking at what it contains.
>
> Can anyone else reproduce this?
>
> I'm using InnoDB in MySQL 5 with BIGINT (have also tried INT) as my
> field type.
>
> Obviously the field is ok because a regular <cfquery> inserts the
> value just fine, so this is limited to Transfer.
>
> Any thoughts??
>
> On Jul 31, 9:04 pm, whostheJBoss <dotfus...@changethings.org> wrote:
> > 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 <mark.man...@gmail.com> 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 <
> dotfus...@changethings.org>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 <jlar...@gmail.com> 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<dotfus...@changethings.org> 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 <mark.man...@gmail.com> 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 <
> > > > dotfus...@changethings.org>wrote:
> >
> > > > > >> > squeek! No ideas on this?
> >
> > > > > >> > On Jul 16, 10:17 pm, whostheJBoss <dotfus...@changethings.org
> >
> > > > 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 <mark.man...@gmail.com>
> wrote:
> >
> > > > > >> > > > ..what is your config for you this object?
> >
> > > > > >> > > > Mark
> >
> > > > > >> > > > On Thu, Jul 16, 2009 at 10:48 PM, whostheJBoss
> > > > > >> > > > <dotfus...@changethings.org>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: mark.man...@gmail.com
> > > > > >> > > > T:http://www.twitter.com/neurotic
> > > > > >> > > > W:www.compoundtheory.com
> >
> > > > > >> --
> > > > > >> E: mark.man...@gmail.com
> > > > > >> 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: mark.man...@gmail.com
> > > T:http://www.twitter.com/neurotic
> > > W:www.compoundtheory.com
> >
>


-- 
Aurélien Deleusière
Mobile :  +33 (0)6 83 78 83 42

ad e-consulting
expertise 2.0

104, Grande Rue - 92310 Sèvres
Fax : + 33 (0)1 49 66 15 53
S.A.R.L. au capital de 8500€
R.C.S. Nanterre 50177609000018

--~--~---------~--~----~------------~-------~--~----~
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 transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to