-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Nicholas Seckar wrote:
>
> I think there are two separate cases: one where you want to insert a
> *lot* of records that you know to be valid, and another to insert a
> bunch of records that you do not trust to be valid.
I 100% agree with this state
I agree with you that there should be an option as to whether to insert
any if some fail. I was thinking of an instance where the user gets
500,000 rows of incomplete data and wants to put in anything that
conforms to validation. This was a scenario that I specifically
experienced. Sometimes
On 7/17/06, Michael Genereux <[EMAIL PROTECTED]> wrote:
I agree import is appropriate. However, the reason someone would wantthis in Rails is to integrate a CSV import through the web interface foran end user. Why would it skip validation though?
There are cases where skipping validation is desir
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
James Adam wrote:
> On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
>
>> > That said, I think providing an 'import' method as a plugin would
>> > certainly be useful to some people (especially those too lazy to
>> > connect to a database by hand).
>>
>
On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
> That said, I think providing an 'import' method as a plugin would
> certainly be useful to some people (especially those too lazy to
> connect to a database by hand).
I like to automate tasks, if that makes me lazy, then I am lazy.
Me too - I mu
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
James Adam wrote:
> On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
>
>> AR is so well thought out and designed, this seems
>> like a core feature that is just simply missing.
>
>
> Since you are looking for speed to the point where you are sacrifici
On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
AR is so well thought out and designed, this seems
like a core feature that is just simply missing.
Since you are looking for speed to the point where you are sacrificing
validations, and pretty much anything else vaguely active-record-ish,
beyond
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael Koziarski wrote:
> On 7/17/06, James Adam <[EMAIL PROTECTED]> wrote:
>
>> Since the behaviour is different from that of create (i.e. no object
>> instances are returned), why not just define a new method which
>> clearly indicates it's aptitud
I'm still not convinced that a workaround like this is the right wayto solve these 'bulk load' / ETL scenarios. Why not use your
database's import tools or some really lightweight SQL wrappers?While the 'insert' method is more universal, I agree that it's often smarter to use the vendor tools. F
I agree import is appropriate. However, the reason someone would want
this in Rails is to integrate a CSV import through the web interface for
an end user. Why would it skip validation though?
I would expect:
1. A creation of ActiveRecord objects for all the elements in the hash.
2. Validatio
On 7/17/06, James Adam <[EMAIL PROTECTED]> wrote:
Since the behaviour is different from that of create (i.e. no object
instances are returned), why not just define a new method which
clearly indicates it's aptitude for inserting large amounts of data?
Model.import(hashes) or something...
The be
Since the behaviour is different from that of create (i.e. no object
instances are returned), why not just define a new method which
clearly indicates it's aptitude for inserting large amounts of data?
Model.import(hashes) or something...
- james
On 7/17/06, zdennis <[EMAIL PROTECTED]> wrote:
-
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rick Bradley wrote:
> * zdennis ([EMAIL PROTECTED]) [060716 20:33]:
>
> Not commenting on the viability of the patch as a whole, but perhaps
> rather than :fast / :fastest it would be better to drop :fast (which as
> I understand it simply reduces th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Rick Bradley wrote:
> * zdennis ([EMAIL PROTECTED]) [060716 20:33]:
>> Could someone check this out and give some feedback? I have started to
>> develop this as a separate plugin for ActiveRecord, but the more I think
>> about it the more it seems that
* zdennis ([EMAIL PROTECTED]) [060716 20:33]:
> Could someone check this out and give some feedback? I have started to
> develop this as a separate plugin for ActiveRecord, but the more I think
> about it the more it seems that this sort of thing should be in core.
> Thoughts?
Those are impressive
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Attached is a patch with the following API change for
ActiveRecord::Base.create.
Currently ActiveRecord::Base.create takes either a hash of attributes or
an array of hashes of attributes. If you pass in an array it will treat
each hash individually an
16 matches
Mail list logo