Thanks 100rk, I believe I have solved this problem with your help.

This is what I got when I called pr($agent):

Array
(
    [Agent] => Array
        (
            [id] => 1
            [customer_id] => 1
            [portraitImage] =>
            [realtor_id] => 0
            [agenttype_id] => 0
            [slogan] => This isn't working right :(
        )

    [Listing] => Array
        (
            [0] => Array
                (
                    [id] => 1
                    [mlsNumber] => 317954
                    [price] => 217000
                    [bedrooms] => 4
                    [bedrooms2] => 1
                    [fullBathrooms] => 2
                    [halfBathrooms] => 1
                    [sqfeet] => 717.89
                    [lotSize] => 30x50
                    [builtIn] => 2003
                    [address1] => Somewhere over the
                    [address2] =>
                    [doDisplayAddress] => 1
                    [postalCode] => L8M 3B4
                    [description] => Here is a big description.
                    [hasVirtualTour] => 0
                    [virtualtour_id] => 0
                    [externalVirtualTour] =>
                    [views] => 0
                    [customer_id] => 1
                    [board_id] => 0
                    [region_id] => 0
                    [vendorEmail] =>
                    [vendorEmail2] =>
                    [doSendAgentStats] => 0
                    [availability_id] => 0
                    [pinNumber] => 0
                    [created] => 2006-05-19 17:24:59
                    [modified] => 2006-05-19 17:25:29
                )

        )

)

The [Listing] came from an association linked to the Customer model.
Therefore, it was obvious that the Agent model was picking up some
information from its parent class. I had previously commented out the
$belongsTo line in the Agent class because it caused errors when I also
had a $hasOne line in the Customer class. However, once I uncommented
the line, a [Customer] array appeared which had all the information I
needed. In order to make it work, I had to keep the $hasOne line
commented out.

Anyway, I'm not sure if it really makes sense to say that a subclass
"belongs" to its parent class, but I'm not going to argue when it works
:)

Thanks for all of your help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to