Oh right OK, well in that case I think the problem is that you pulled the long bendy bit on the front when you should have pulled the shorter bendier bit on the back
I have a page & a template table. I have a relationship defined such that one page has one template & one template has many pages. Problem is that the query being executed is searching for the page id in the template column
People do have a tendency in this room to get all upity about this but rarely does it get pointed out that we are aware that what we usually suggest is completely impractical
@PeeHaa I have a page that has one template. The template can have many pages. When I run the query, it looks like it's trying to select the page id from the template table
I have just got started with laravel v3 and am trying to wrap my head around eloquent's One-To-Many relationships by creating a blog, I have posts that have a many to one relationship with categories (Each Post is linked to a category).
I have the following tables with the following fields:
pos...
@PeeHaa hasMany doesn't define it right. A page has one template, and a template can belong to any number of pages, but a template does not "have" pages
@tereško I just saw php code that does ActiveRecord and actually makes a different DB request whenever you fetch different objects rather than deferring all requests until one of the objects is actually required, so $a = getObj(); $b = getOtherObj(); $c = getThirdObj(); would run three queries, is that common in PHP?
@tereško it seems like a really common pitfall, a lot easier to fall into even than "select n+1". I guess the problem is really the fact activerecord abstracts the wrong thing, but no reason to preach to the choir.
Well I am extremely pleased to report that after basically 2 solid days of work on it, my HDD that died that contained all of my music (~490GB) has given all of it back to me except for 38MB
quick-notice Disabling memory swapping to disk has a significant performance gain (at least on OS X as long as you quit your programs when memory pressure (the kernel compresses memory on OS X) is high).
This is also the reason I just bought a 24 channel RAID controller. I already own 5 2TB drives, I can construct a RAID 5 array from them without losing any data (I think) and gradually build up the array to accommodate all my existing data, get a hot spare in and it should be fairly fault tolerant and scalable for a few years at least
Aye. If I was going to build a house i'd build a secret room with a trampoline floor or a hammock floor. The ceiling would be a giant monitor. Speakers all around and no lights.
Nothing relaxes me after a long day at work like having a glass of wine and reading through some base64 encoded hash values. — Abe MiesslerApr 22 at 17:01
The output of MD5 is binary: a sequence of 128 bits, commonly encoded as 16 bytes (technically, 16 octets, but let's use the common convention of bytes being octets).
Humans don't read bits or bytes. They read characters. There are numerous code pages which tell how to encode characters as bytes...