Skip to main content
August 25, 2010
Question

Multiple datasources in ORM issue

  • August 25, 2010
  • 4 replies
  • 1380 views

Hello,

I've installed Coldfusion 9.0.1 yesterday, but I'm having trouble to configure multiple datasources in Coldfusion ORM. For some reason, when I try to use more than one data source, Coldfusion says that my CFC is not mapped. However, if I switch back to one data source, everything works fine. Here's my CFC (PeopleEntity.cfc):

<cfcomponent persistent="true" datasource="action" table="people">

     <cfproperty name="id" type="numeric">

     <cfproperty name="name" type="string">

     <cfproperty name="birthdate" type="timestamp">

     <cfproperty name="address" type="string">

     <cfproperty name="phone" type="string">

</cfcomponent>

Here's the query that throws the error:

ormExecuteQuery("select count(*) from PeopleEntity")

And here's the error:

org.hibernate.hql.ast.QuerySyntaxException: ActionEntity is not mapped [select count(*) from PeopleEntity]

What could it be?

    This topic has been closed for replies.

    4 replies

    Participant
    March 29, 2011

    just updating...

    its a bug after version 9.0.1 when working with multiple datasources. As a workaround you need to manually set the datasource each time you use ormexecutequery.

    <cfset artistArr = ORMExecuteQuery("from Artists where artistid=1", true, {datasource="cfartgallery"})>

    entityload doesn't seen to suffer from this problem.

    Participant
    March 24, 2011

    im having the same issue. Oddly everything works fine in my development machine. I tried everything but hibernate refuses to map one particular cfc.

    talofer99
    Inspiring
    March 24, 2011

    does a simple EntityLoad works ?

    since I tryed to use diffrent name for the cfc the nthe tabel and run to a problem of not being able to laod the cfc ... or get any info out of it.

    So try a simple task and then see if its mapped

    March 22, 2011

    bump?