Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1RC1
-
Fix Version/s: JRuby 1.1RC2
-
Component/s: None
-
Labels:None
-
Environment:MySQL
-
Number of attachments :
Description
To verify this,
Just try SomeModelBackedByTable.columns in script/console, this should return all columns in the table.
Try the same with SomeModelBackedByView.columns and this should result in
"Table ViewName doesn't exist".
Upon investigation, this problem occurs in class JdbcAdapterInternalService.java inside method
public static IRubyObject columns_internal(final IRubyObject recv, final IRubyObject[] args)
There is check here to verify that the table indeed physically exists before proceeding to get metadata. Obviously this check fails for views. Just commenting out the check fixes the problem.
One way to fix is just not have to have this check. There may be better ideas to fix this.