Hi Thomas,
I'm running the exact same issue.
I add to monkey patch the adapter after setup with:
class << adapter
def quote_name(name)
super.gsub('.', '"."')
end
end
Is there a cleaner DM fix for that?
On Friday, November 26, 2010 8:23:00 AM UTC-5, tombi wrote:
>
> Hi all
>
> Oracle DB
> I'd like to query a table in other schema (account) than
> i'm logged in.
>
>
>
> DataMapper.setup(:default,"oracle:fred/pw@server:1521:SID")
>
> class Customer
> include DataMapper::Resource
>
> storage_names[:default] = "scott.tbl_customer"
>
> property :id, Integer, :key => true
> property :name, String
> property :company, String
>
> end
>
>
> Datamapper create this Query:
>
> SELECT "NAME", "COMPANY" FROM "SCOTT.TBL_CUSTOMER"
>
> but correct in Oracle is:
>
> SELECT "NAME", "COMPANY" FROM "SCOTT"."TBL_CUSTOMER"
>
>
> How has my class to look like,that i get a correct query string?
>
> with somthing like that:
> DataMapper.repository(:default).adapter.resource_naming_convention =
> .......
>
>
> Best regards
> Thomas
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/datamapper?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.