English 中文(简体)
为什么在提升到铁路3.1号之后,将这种铁路拖到3号轨道上?
原标题:Why doesn t this Rails 3 AREL line work after upgrade to Rails 3.1?

该行文如下:

product_properties.includes(:property).where("properties.name =  Label Description ").first

It exists in a "Product" model, which has_many :product_properties. The SQL is generating, but throwing a MySQL error because it is trying to SELECT a blank column:

SELECT  `product_properties`.`` AS t0_r0, `product_properties`.`id` AS t0_r1, ... 

我怎么能打断造成塞选塔一只空白的row子是什么?

最佳回答

我找到答案。 该组正在研究上文选任表第二栏。 它是“id”。 这通常属于第一栏。

本表中的“id”并非主要关键,因此表格没有主要关键。 很显然,在3.1方面发生了急性毒性反应效应变化,导致铁路寻找一种主要钥匙,如果找不到一条钥匙,则会回空白。 这就造成了问题。 我不知道这是否是铁路。

问题回答

暂无回答




相关问题
Weird Rails 3 scope behavior

I ve implemented the following scope in a rails 3 application: scope :popular, lambda { |l = 5| order( views desc ).limit(l) } However, it seems that when you attempt to count its records directly ...

Arel: How to cleanly join multiple conditions with OR?

In my Rails app, I loop through an array to create a list of conditions that must be joined by OR. Below is the basic flow of how I currently do so. conditions = nil set.each do |value| condition = ...

Finds in Rails 3 and ActiveRelation

I m trying to understand the new arel engine in Rails 3 and I ve got a question. I ve got two models, User and Task class User < ActiveRecord::Base has_many :tasks end class Task < ...

Eager-loading association count with Arel (Rails 3)

Simple task: given that an article has many comments, be able to display in a long list of articles how many comments each article has. I m trying to work out how to preload this data with Arel. The "...

How do you scope ActiveRecord associations in Rails 3?

I have a Rails 3 project. With Rails 3 came Arel and the ability to reuse one scope to build another. I am wondering if there is a way to use scopes when defining a relationship (e.g. a "has_many"). ...

热门标签