#1366 ✓not-applicable

Incorrect SQL generated in association

Reported by bluepojo | July 16th, 2010 @ 03:54 PM

I am building on an existing database trying to set up associations for the existing tables.

In one case I have:

Foo has one Bar
the primary key in Bar is called "status", which is an integer

I want to say:

class Foo

has 1, :bar, :child_key => [:status]


This results in the following SQL when Foo.last.bar is called, for example:

Due to having STATUS duplicated, this throws an "ambiguous column naming in select list" error. I am using the Oracle adapter.

Is this a bug, or is there a way to keep the same column from being generated twice by DataMapper?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »