Hello,

I am working on a ColdBox 3 and CF9 ORM app on a Mac using CF9.01
multiserver, CFBuilder and Apache 2.

I keep getting "error while resolving relationship" when trying to use ORM
and a CF mapping. First let me show you what I have in Apache, then my
Application.cfc settings for orm and finally my actual object's properties
where the relationships are defined.

APACHE VHOST

<VirtualHost *:80>
Alias /core /Users/aaronroberson/Sites/mysite
<Directory /Users/aaronroberson/Sites/mysite>
         AllowOverride All
        </Directory>
     DocumentRoot /Users/aaronroberson/Sites/mysite
     ServerName mysite.com
</VirtualHost>

Application.cfc SETTINGS

<cfset this.mappings["/core"] =
getDirectoryFromPath(getCurrentTemplatePath())>
<cfset this.ormenabled = "true">
<cfset this.datasource = "myDB">
<cfset this.ormsettings = {
dialect="MySQL",
dbcreate="dropcreate",
cfclocation=["model","/core/model"],
eventhandling=true,
eventhandler="model.ORMEventHandler",
logsql = "true",
flushAtRequestEnd=false
} />

RELATIONSHIP SETTINGS

I have two CFCs:
/Users/aaronroberson/Sites/mysite/model/User/User.cfc
/Users/aaronroberson/Sites/mysite/model/Address/Address.cfc

<cfproperty name="PrimaryAddress" hint="Array of User Addresses"
singularname="PrimaryAddress"
fieldtype="many-to-many" collectiontype="array"
cfc="core.model.Address.Address" lazy="true" insert="false" update="false"
linktable="userAddress" where="isPrimary='true'"/>

Ok, so the actual error that I am getting is "Error while resolving the
relationship PrimaryAddress in cfc core.model.User.User. Check the column
mapping for this property." This indicates that ColdFusion is not able to
locate the core.model.Address.Address CFC. However, I have a cfmapping and
apache alias of "/core" that points to the root of my application
at /Users/aaronroberson/Sites/mysite and I also have the orm setting
cfclocation set to look in both model and /core/model for the CFCs. I have
removed the cfclocation setting entirely and got the same error. I also
removed core.model from the cfc path inside the cfproperty setting of my
User object and still got the same error.

The odd thing is that this same app has been setup on two or more Windows
machines with IIS and a virtual directory to "/core" and the app runs
without any problems. I have also scaled down the app by removing the models
folder and all references to any model objects and the default action and
event run. There seems to be a problem with CF Mappings and CF9 ORM on Mac.

Any help would be much, much, greatly and amazingly appreciated!!!!

Thanks,
Aaron


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336208
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to