Displaying 20 results from an estimated 11000 matches similar to: "ActiveRecord: manually setting :id"
2006 Aug 02
2
mangle ActiveRecord
Dear Gurus on Rails!
How do I change the behaviour of one method in
ActiveRecord::ConnectionAdapters::SchemaStatements ?
Full story:
I''d like to mangle
ActiveRecord::ConnectionAdapters::SchemaStatements
so when it creates a new sql table, it also (optionally) creates my
created_at, deleted, key_id, session_id etc columns that I use on basically
all tables.
It would not be DRY to repeat
2009 Sep 28
5
Multi-databases support
Hi,
While I was hacking ovirt-server, I have found that it's currently
restricted to Postgres DB. Even if I like postgres for serious work on a
server, I really prefer to hack/dev locally on a Sqlite or MySQL DB.
I have googled on rails in order to find a good answer for the "foreign
key problem" which forces OVirt to stay on pg. I have found a plugin on
this particular
2010 Apr 20
13
why is ActiveRecord tying to select nonex ID column?
I''ve loaded (and updated) thousands of these MeteredUsage records. In
the middle of a run, I suddenly get:
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column ''id'' in
''where clause'': UPDATE `metered_usages` SET `cost` = 12603.46 WHERE `id`
= NULL
I can''t see anything that''s different about this particular record
compared to
2008 Mar 21
2
x86_64 Fedora Core 8 Xen source build fails - help!
I''ve updated a Fedora 8 kernel to 2.6.24.3-34.fc8 and am
trying to put Xen into it from the Xen 3.2.0 source tarball.
Eventual destination is an OpenSolaris box running x86_64
OpenSolaris 10. However, "make world" fails in the xen-3.2.0
directory. It seems to be searching for something called
"linux-2.6.18-xen.hg". Linux 2.6.18 has nothing to do with it,
so
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id''
I have a Model class like the following:
class Article < ActiveRecord::Base
set_primary_key "ARTICLE_ID"
end
however, using a link_to like the following (modified scaffolding),
the link has no id value:
<% for article in @articles %>
<tr>
<% for column in
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2005 Oct 23
2
Is it feasible to cross-build compat5x binary?
Hi folks,
I think we need to update compat5x binary to fix FreeBSD-SA-05:21.openssl,
but will the binaries built by ``make universe'' be identical with actual
build on Alpha, Sparc64, etc? (Yes, I'm volunteering to do the work iff
they are identical ;-)
Cheers,
--
Xin LI <delphij frontfree net> http://www.delphij.net/
See complete headers for GPG key and other information.
2006 Jun 30
4
ActiveRecord Migrations, without autonumbered PK''s
I love using ActiveRecord Migrations to build tables.
Sometimes, I don''t want to use autogenerated PK''s - I want to set them
automatically (why? I''m importing read only data from a large list of
medications, and want to use the PK''s assigned by the medication
research company...). Is there anyway to do this using Migrations? I
know that I don''t
2006 Jun 12
2
Migrations and primary id
I set up a migration yesterday for the first time and remembered that Rails
will assign a primary id column on it''s own. No need to put it in to the
SQL.
The name of the column though is just "id", is there a way to over ride the
default if I wanted ?
TIA
Stuart
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2002 Feb 19
2
cdf of the standard normal distribution
Dear Experts,
I need to calculate the cdf of the standard normal distribution, i.e.
H(x) = 1/sqrt(2*pi) integral(exp(-z^2/2) dz), where z is b/w -infi to
infi.
I know there should be a way to do it in R, but did not know to do it.
I'd appreciate any help you could offer.
Charlie Liu
Graduate student intern at EPA/ECO
2006 Feb 19
3
multi-sql problem?
hi all,
how to excute multi sql statement in rails
#-------------------------------------------------------
sql_1 = ''drop table if exists test''
sql_2 = ''create temporary table test select * from test_1''
sql_3=''select * from test''
#-------------------------------------------------------
any ideas
all regards
--
Posted via
2006 Aug 07
9
[OT] Rails is built into OS X 10.5
This coming out of WWDC. Pretty cool to see this kind of thing happen.
--
J "Brien" | HybridIndie Productions | http://hybridindie.com |
hybridindie@gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060807/380ae29c/attachment.html
2006 Mar 14
4
Rails Developer Positions in San Diego
We are looking for fulltime Rails Developers to join a tremendous rails only
development team in San Diego. Please send resume and examples of work to
info@mingle.com.
Pay is based upon experience and there is an opportunity for options.
Cheers,
Mike
Mike C. O''Brien
CEO
Mingle, LLC
701 B Street, Suite 1150
San Diego, CA 92101
mcob@mingle.com
619-922-6970 Cell
619-822-2471 Office
2005 Jul 26
6
eager associations and limit/offset
Hi,
currently the eager association loading via ":include" does not work
when a has-many or habtm association is combined with offset/limit
(which is required for paginations). This is because in these cases, the
result set will contain more than one row per object, but limit/offset
works on row numbers.
I''ve developed a patch that makes this work by using 2 SQL statements
2006 Feb 10
1
Bizarre ActiveRecord::Errors/validation problem
I could be going mad and missing something really obvious here but I''m
getting an unexpected result from the following.
The schema:
create_table :services, :force => true do |t|
t.column :id, :primary_key
t.column :name, :string, :ilmit => 5, :null => false
t.column :port, :integer, :null => false
t.column :status, :string
end
The model:
class Service <
2006 Apr 17
7
MySQL backticks and column names
The upgrade to Rails 1.1 hurt my ability to run tests because it
generated the following MySQL error:
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near ''key ON config (key)'' at line 1: CREATE UNIQUE INDEX key ON
config (key)
I have a table called `config` with a column
2005 Jul 25
2
acts_as_tree and traversing parent/child relationships
I am working on an Rails application that uses a pretty complex
category structure through out the site. I have defined a table to
house all the info and a FK to reference parents within the table
CREATE TABLE categories (
id int(11) NOT NULL auto_increment,
name varchar(50) NOT NULL,
parent_id int(11) default NULL,
constraint fk_category_id foreign key (category_id) references
1998 Aug 17
1
JDK1.1.6-jdk1.1.6.V98-8-14.tar.gz is released
This is essentially the same as the previous JDK release, except that
ServerSocket's didn't correctly set SO_REUSEADDR, causing some programs
to fail.
Note, the Multicast bug still exists in FreeBSD, which cause multicast
programs to fail. See the FreeBSD Java WWW page for more information:
http://www.freebsd.org/java
Finally, there is still no ftp access to the JDK (yet). Until
2008 May 27
3
dom0 memory limits greater than 2Gb?
The main Xen mailing list ("xen-users") generally advises
users to limit the memory on dom0 to 2Gb or less. Apparently the
general version of Xen has troubles with this.
What''s the corresponding advice for the Xen in OpenSolaris,
Nevada b87 in particular? I''ve got an X4600 with 32Gb of physical
memory on it. I was originally planning to have dom0 be the general-