For your user/password thing i would use this: <CFSET user = user.load(username=yourscope.name,password=yourscope.password)) />
<CFIF user.getUserId()> do user is found things </CFIF> On 8/10/06, Ray West <[EMAIL PROTECTED]> wrote:
OK, replying to a couple of emails here. Thanks everyone for the help... Yes the UserID field is definitely a PK. I turned it off and saved and turned it back on to be sure it was set. Same problem exists. While the PK was turned off I tried the shortcut method. It still worked. I am in development mode. I have deleted all of my project files and they were recreated... Same problem exists. So are you saying that I can only 'search' by fields that are primary keys? What if I want to create a record and run a login script on it comparing a username and password that are not keys? This works using the shortcut method. Why should it not work by setting the properties and loading the object? Hope I answered everything. Ray João Fernandes wrote: > The problem is, when you use > <cfset record.setUserid(someval)> > <cfset record.load()> > > In the read method inside UserDao.cfc if you take a look into the code I > posted in my last email, load() and load(userid=val) go through different > paths. The load() method goes through > > <cfset qRead = UserGateway.getByFields( > <!------- This part is blank -------> > ) /> > > The part in blank is where reactor should put the code to load the record > based on the primary key definition. Delete your project files and > regenerate to see if the problem persists. > > João Fernandes > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Ray West > Sent: quinta-feira, 10 de Agosto de 2006 16:15 > To: [email protected] > Subject: Re: [Reactor for CF] Ambiguous Record Problem > > The shortcut method appears to be using the same setUserID property > setter that I am calling. And yet the shortcut method works... > > Ray > > > Ray West wrote: >> frak... well... it is not working here and I need to be able to pass the >> object into a method for processing (not to mention that that is the >> better way to do it) so the shortcut method won't work for this. >> >> R >> >> Jared Rypka-Hauer wrote: >>> I've been using it just fine with SQL Server for eons... well, not >>> eons, but a long time. >>> >>> I'm trying to think of what the issue could be man. Coming up, as >>> usual, with a big fat blank. ;) >>> >>> J >>> >>> >>> ------------------------------------------------ >>> >>> Jared C. Rypka-Hauer >>> >>> Continuum Media Group LLC >>> >>> http://www.web-relevant.com >>> >>> Member, Team Macromedia - ColdFusion >>> >>> >>> "That which does not kill me makes me stranger." - Yonah Schmeidler >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> On Aug 10, 2006, at 9:25 AM, Ray West wrote: >>> >>>> NP Chris, >>>> >>>> This is an exception thrown by Reactor and not a CF error. I don't >>>> get anything extra when I turn on debugging in CF. A query of some >>>> sort apparently runs fine, it just returns unexpected data. >>>> >>>> I am going to load the new version and see if there is any difference. >>>> >>>> Have anyone reproduced this or gotten it to run correctly with SQL >>>> Server? >>>> >>>> Ray >>>> >>>> Chris Phillips wrote: >>>>> I appologize Ray. >>>>> I didn't catch that you were saying that >>>>> <cfset objUser.setUserID(1) /> >>>>> <cfset objUser.load() /> >>>>> didn't work >>>>> and >>>>> <cfset objUser.load(UserID=1) /> >>>>> did. >>>>> Which makes this rather wierd. >>>>> If it were me, I'd turn on debugging and watch the queries that CF >>>>> is generating to see how they are different. >>>>> Let us know what you see. >>>>> Regards, >>>>> Chris >>>>> On 8/9/06, *Ray West* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: >>>>> It is... second guess? :-) >>>>> Can anyone repro this? >>>>> Ray >>>>> Chris Phillips wrote: >>>>> > First guess is that UserID is not a PrimaryKey. >>>>> > >>>>> > On 8/9/06, *Ray West* < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >>>>> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote: >>>>> > >>>>> > Hi, >>>>> > >>>>> > In MS SQL Server, whenever I create a record and do this: >>>>> > >>>>> > <cfset objUser.setUserID (1) /> >>>>> > <cfset objUser.load() /> >>>>> > >>>>> > I get an ambiguous record error, even though there is >>>>> only one >>>>> > record in >>>>> > the table with that ID. >>>>> > >>>>> > When I do: >>>>> > >>>>> > <cfset objUser.load(UserID=1) /> >>>>> > >>>>> > It works fine. >>>>> > >>>>> > Any help appreciated... >>>>> > >>>>> > Ray >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- >>>>> > -- -- -- -- -- >>>>> > Reactor for ColdFusion Mailing List >>>>> > [email protected] <mailto:[email protected]> >>>>> <mailto:[email protected] <mailto:[email protected]>> >>>>> > Archives at: >>>>> http://www.mail-archive.com/reactor%40doughughes.net/ >>>>> > < http://www.mail-archive.com/reactor%40doughughes.net/> >>>>> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- >>>>> > -- -- -- -- -- >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Chris Phillips >>>>> > www.dealerpeak.com <http://www.dealerpeak.com> >>>>> <http://www.dealerpeak.com> >>>>> > Senior Application Developer >>>>> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- >>>>> > -- -- -- -- >>>>> > Reactor for ColdFusion Mailing List >>>>> > [email protected] <mailto:[email protected]> >>>>> > Archives at: >>>>> http://www.mail-archive.com/reactor%40doughughes.net/ >>>>> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- >>>>> > -- -- -- -- >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- >>>>> -- -- -- -- >>>>> Reactor for ColdFusion Mailing List >>>>> [email protected] <mailto:[email protected]> >>>>> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ >>>>> <http://www.mail-archive.com/reactor%40doughughes.net/> >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- >>>>> -- -- -- -- >>>>> -- >>>>> Chris Phillips >>>>> www.dealerpeak.com <http://www.dealerpeak.com> >>>>> Senior Application Developer >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- -- >>>>> Reactor for ColdFusion Mailing List >>>>> [email protected] <mailto:[email protected]> >>>>> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ >>>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>>> -- -- -- -- >>>> >>>> >>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>> -- -- -- -- >>>> Reactor for ColdFusion Mailing List >>>> [email protected] <mailto:[email protected]> >>>> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ >>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>>> -- -- -- -- >>>> >>> >>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>> -- -- -- -- >>> Reactor for ColdFusion Mailing List >>> [email protected] >>> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ >>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >>> -- -- -- -- >> >> >> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >> -- -- -- >> Reactor for ColdFusion Mailing List >> [email protected] >> Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ >> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- >> -- -- -- >> >> >> > > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > Reactor for ColdFusion Mailing List > [email protected] > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > -- -- > > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > Reactor for ColdFusion Mailing List > [email protected] > Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > > > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
