On 6/30/06 7:45 PM, Glenn Gallien wrote:
> DBD::mysql::st execute failed: Unknown column 't2.id' in 'on clause' at
> /usr/local/lib/perl5/site_perl/5.8.8/Rose/DB/Object/Manager.pm line 1435

I'm assuming there is actually a t2.id (objects.id) column, right?

> The sql that causes the error looks like this.
> ...
> FROM projects t1
> LEFT OUTER JOIN user_permissions t3 ON(t3.object_id = t2.id)
> LEFT JOIN users t4 ON(t3.user_id = t4.id)
> LEFT OUTER JOIN group_permissions t5 ON(t5.object_id = t2.id)
> LEFT JOIN groups t6 ON(t5.group_id = t6.id),
> objects t2       
> <--- this seems to be the problem
> WHERE ...
> 
> My question. Is this a bug in the generated sql? Or, is this suppose to
> happen and I should just not set not_null on the foreign key column?
> I can post more code if nessecary

The not_null thing is probably changing the join type.  RDBO considers that
foreign object "required" even though you used the with_objects param.  Of
course, it's not really required in MySQL in because NOT NULL has little
meaning in most modes of operation.  (Ditto for referential integrity.)

I'm not sure what the solution is...maybe I'll just disable this
"optimization" when I see that the database is MySQL.  I'll try to make a
smaller reproducible case, then I'll get back to you...

-John



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to