Hi Chris,

I did that yesterday once I realized that the getXyzRecord() method wasn't working. I completely removed the Reactor directory and retrieved the latest BER from the SVN. Attached are the the SQL Create Statements for MSSQL. The Events Table also has a bunch of hasMany relationships which seem to work fine, but the hasOne isn't loading the relevant record.

~Jeff~

On 3/30/06, Chris Phillips <[EMAIL PROTECTED]> wrote:
I would try two things.

One, get the latest files from SVN and delete all the generated files in the reactor folder under projects.

If that doesn't work. Maybe, you could generate the sql Create statements for the 2 tables so that we can see the actual fields, types, and relationships.

I have the same relationships working just fine in SQL Server 2000 with both int and guid keys.


On 3/29/06, Jeff Lester < [EMAIL PROTECTED]> wrote:
Hey guys,

Thanks for the help, Sean's right, my problem isn't loading without a primary key, its that the getXyzRecord() function only returns a blank record object, even though a record does exist in the table. I have checked my keys, my data, and my xml object configuration in the Reactor config file. I will send some more details when I get to work, but for now I'll try to give a bit more detail. On the reactor Documentation on pages 29 & 30 I followed those instructions to make my config look like the following:

<reactor>

     
<config>
            <project value="campIncident" />
            <dsn value="ER" />
            <type value="mssql" />
            <mapping value="/camp/data/Incident/" />
            <mode value="development" />
      </config>  

      <objects>
            <object name="Events">
                  <hasOne name="EventCategories">
                        <relate from="CategoryID" to="CategoryID" />
                  </hasOne>
           
</object>
      </objects>

</reactor>

Now I can do a createRecord just fine set the EventID and load the Record and that works. However, when I call getEventCategoriesRecord() it loads a blank record even though CategoryID in the Events Table does link to an existing record in the EventCategories Table. What other files can I supply to help?

Cheers,
Jeff


On 3/30/06, Sean Corfield <[EMAIL PROTECTED] > wrote:
On 3/29/06, Cody Caughlan <[EMAIL PROTECTED]> wrote:
> No, I think he is referring to the whole primary-key-foreign-key issue that
> stumped me too. Remember, Sean how you suggested I tweak my XSL to refer to
> the proper column in the getFooRecord() method??
>
> If you search the archives for "mapping question" I think it will point you
> in the right direction. Here is my original post, let me know if its the
> same issue:

Doug fixed that in the SVN repo a while back, based on my suggested
change (to add the keys into the load() call, in the XSL).

If you ensure you have the latest version from SVN and blow away your
project/* files, you should find you original example works.

So I do not believe that is Jeff's problem.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



-- 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/



--
Chris Phillips
www.dealerpeak.com
Senior Application Developer -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

ÿþCREATE TABLE [dbo].[EventCategories] (

       [CategoryID] [int] NOT NULL ,

       [Category] [varchar] (50) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL 

) ON [PRIMARY]

GO



ÿþCREATE TABLE [dbo].[Events] (

       [EventID] [int] IDENTITY (1, 1) NOT 
NULL ,

       [DateOccurred] [datetime] NULL ,

       [EventTypeID] [int] NULL ,

       [ClassificationID] [int] NULL ,

       [CategoryID] [int] NULL ,

       [IncidentID] [int] NULL ,

       [Identification] [varchar] (100) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
NULL ,

       [RiskAssessmentCode] [varchar] (6) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
NULL ,

       [DepartmentID] [int] NULL ,

       [AlertTitle] [varchar] (50) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL ,

       [IncidentDescription] [text] 
COLLATE SQL_Latin1_General_CP1_CI_AS 
NULL ,

       [SafetySuggestions] [text] COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL ,

       [FileReference] [varchar] (50) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
NULL ,

       [SectionID] [int] NULL ,

       [DepartmentCategoryID] [int] NULL ,

       [Facility] [varchar] (50) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL ,

       [WorkingWeek] [tinyint] NULL ,

       [Active] [bit] NULL ,

       [Finalised] [datetime] NULL ,

       [PolicyID] [int] NULL ,

       [Deductible] [money] NULL ,

       [CurrentEstimate] [money] NULL ,

       [TotalCost] [money] NULL ,

       [TotalClaimed] [money] NULL ,

       [TotalDaysLost] [int] NULL ,

       [Completed] [datetime] NULL ,

       [CompletedBy] [varchar] (50) 
COLLATE SQL_Latin1_General_CP1_CI_AS 
NULL ,

       [Status] [int] NULL ,

       [DateEntered] [datetime] NULL ,

       [EnteredBy] [int] NULL ,

       [ReportedTo] [varchar] (50) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL ,

       [RaisedBy] [varchar] (50) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL ,

       [Employer] [varchar] (30) COLLATE 
SQL_Latin1_General_CP1_CI_AS NULL 

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO



Reply via email to