<   January 2012   >
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
00:06 siplux joined
00:59 rsim joined
01:15 rsim joined
01:36 rsim joined
02:27 senny joined
02:32 ojak joined
02:49 _pke_ joined
03:12 helllen joined
03:12 <helllen> helllo
03:12 <helllen> how do I create a empty DataMapper::Collection
03:14 pietia joined
03:30 wilmoore joined
03:44 Micr0mega joined
03:49 Micr0mega left
03:49 Micr0mega joined
04:07 <kalleth> helllen: i dunno, why would you even want to? DataMapper::Collection.new? Object.all(:id => null) ?
04:08 <helllen> I have used
04:09 <helllen> Model.all(:id=>0)
04:10 <kalleth> ok, take it back a bit
04:10 <kalleth> _why_ do you want an empty collection?
04:10 <kalleth> what possible reason could you have for wanting one?
04:11 <kalleth> unless testing, i guess
04:12 <helllen> I need it because if the data is not valid I don't want to ask database
04:13 <kalleth> you'll need to expand a bit.. what data, and how could it be invalid without checking the database to see if its invalid?
04:14 <kalleth> is it for testing purposes? are you doing a search and want to determine if there are any search results? what's the use case
04:46 splattael joined
04:48 pikislabis joined
04:51 jwkoelewijn joined
04:51 <jwkoelewijn> hi all
04:52 <jwkoelewijn> someone here who's working on the new dm-validations?
04:52 <jwkoelewijn> and with some knowledge of solnic's dm-validations-ext?
04:53 <jwkoelewijn> i was under the impression that the new dm-validations with incorporate some dm-validations-ext stuff, like for instance filling the errors object with all errors on a failed save
04:53 <jwkoelewijn> but it seems this is not in there...
04:54 <jwkoelewijn> will it come in, or should i find work-arounds for it?
05:12 x0F_ joined
05:25 snusnu joined
05:29 eignerchris joined
05:51 solnic joined
06:06 antinitro___ joined
06:25 mltsy_ joined
06:27 jwkoelewijn joined
06:30 gix joined
07:02 <helllen> helllo
07:02 <helllen> I would like to search all obs from one table with something in a field
07:02 <helllen> for example
07:02 <helllen> @rules.all(:msg.like => "%VLC%")
07:03 <helllen> being @rules a DataMapper::Collection
07:03 <helllen> I would like no case sensitive
07:03 <helllen> @rules.all(:msg.like => "%vlc%") return different result
07:03 <helllen> how could I do this?
07:08 <helllen> does it wotk :msg.like ? in datamapper ?
07:28 Jagdot joined
07:50 solnic joined
09:44 dray joined
10:13 solnic joined
10:23 solnic joined
10:37 knowtheory joined
10:56 solnic joined
11:07 ckrailo joined
11:23 kenphused joined
11:38 hadronzoo joined
11:40 v0n joined
11:58 mbj joined
11:59 Micr0mega left
11:59 Micr0mega joined
12:01 mltsy_ joined
12:01 Micr0mega left
12:05 _pol joined
12:13 ojak joined
12:29 blargh joined
12:29 <blargh> hi all. is there a reason why my join tables could be being ignored? i specify that a user has n projects via permissions and vice versa, but it still looks for the projectuser table, which does not exist.
12:30 <blargh> this is in datamapper 1.0.2
12:44 em-dash joined
13:05 <hadronzoo> blargh: I think you want :through instead of :via
13:08 <blargh> hadronzoo: sorry yeah, i use through
13:28 blarghl joined
13:28 Kaasi joined
13:28 hadronzoo joined
13:30 mono0x joined
13:33 eignerchris joined
14:26 brianpWins joined
14:53 pnomolos joined
14:57 siplux joined
15:02 mbj joined
15:28 mltsy_ joined
15:30 marvin_ joined
15:38 postmodern joined
15:43 buhrmi joined
15:51 Mathetes joined
16:20 <devmod> Hello, is there something wrong with Model.count with conditions? wht's the proper way of doing it?
16:22 <devmod> tried Model.count(:key => 'VALUE') but that doenst seem to work
16:23 <diago> Friend.count(:conditions => [ 'gender = ?', 'female' ])
16:23 <diago> that's from the docs but I believe you can do Friend.all( :foo => 'bar' ).count
16:24 <devmod> yeah saw that on the doc but no go either
16:24 <devmod> right, that would work
16:25 <devmod> i just thought .count would be more efficient- but it doesnt work for me
16:28 <namelessjon> devmod: The perf different really should be negliable (if there's any). Friend.all(:foo => 'bar') just creates a query object + collection, doesn't fire a query
16:29 <devmod> But if the count used count(*) on the query itself the return would just be a number as opposed to a collection right?
16:30 <namelessjon> devmod: Yeah. It functions just like Model.count(:key => 'VALUE') would.
16:30 <devmod> namelessjon: right, so it's Model.count broken? bc it doesnt work at all for me
16:31 <devmod> same conditions work for a Model.all but not for Model.count
16:32 <diago> what do you mean doesn't work? We use it in our app
16:32 <diago> I just checked every way and it works
16:32 <diago> Foo.count :key => 'foo'
16:33 <diago> and others
16:33 <diago> well, it has to work for pagination
16:42 mrc0ke joined
16:45 mrc0ke joined
17:28 mrc0ke left
18:06 em-dash joined
18:31 solnic joined
18:58 mephux joined
19:02 _pol joined
19:46 <hadronzoo> devmod: did you require 'dm-aggregates' ?
19:52 brianpWins joined
19:52 mono0x joined
20:26 voker57 joined
20:26 voker57 joined
21:00 hadronzoo joined
22:48 knowtheory joined
23:33 antinitro_ joined