SitePoint Sponsor

User Tag List

Page 6 of 6 FirstFirst ... 23456
Results 126 to 128 of 128
  1. #126
    Spirit Coder allspiritseve's Avatar
    Join Date
    Dec 2002
    Location
    Ann Arbor, MI (USA)
    Posts
    648
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ren View Post
    Stuff like...

    http://www.getdorm.com/api/Dorm_Data...ase_Table.html

    http://www.getdorm.com/api/Dorm_Data...ble_Field.html

    Having to describe your schema in such detail first doesn't seem very lightweight.
    Gotcha. I agree. I think people include that stuff so they can create schema from the mappings, but I'd rather just do an SQL dump. Keeping schema stuff out of the mappers definitely makes them lighter.

  2. #127
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ren View Post
    What would you leave out? As it sounds you'd leave out dealing with relationships/assocations... which is what snapshotting/tracking changes to collection is for.

    PHP Code:
    $post = new Post();
    $post->tags[] = $tag;
    $post->save(); 
    I would definitely NOT leave out relationships, as that is probably THE primary reason to use an ORM layer. I understand the need to track changes to know which related rows to cascade save and which columns to include, it just seems like taking snapshots of collections and cloning whole object graphs is overkill for a simple solution and would use too much memory.

    I was just trying to point out that the current discussion was going way beyond the scope of the original question. I'm not trying to kill this thread .

  3. #128
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Czaries View Post
    I would definitely NOT leave out relationships, as that is probably THE primary reason to use an ORM layer. I understand the need to track changes to know which related rows to cascade save and which columns to include, it just seems like taking snapshots of collections and cloning whole object graphs is overkill for a simple solution and would use too much memory.
    Don't need to clone whole object graphs, just collection contents, which are just a set of object references. Its either that, or inject a collection class as hydration time that tracks changes to itself.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •