Skip to content

Instantly share code, notes, and snippets.

View jbjonesjr's full-sized avatar
✏️
Writing something, somewhere {...}

Jamie Jones jbjonesjr

✏️
Writing something, somewhere {...}
View GitHub Profile
@jbjonesjr
jbjonesjr / gist:832669
Created February 17, 2011 20:56
3-tier gorm ball of fail
/*
This is a bit of a contrived example, but attempts to show the level and relationships of data that I am working with.
Three-tiered snippet example. Logic:
A person has an office full of file cabinets and folders. They own these items.
Any Person has a zero to many of these Cabinets and Folders. There are also default's specified for ease of access when dealing with a person's possessions.
A FileCabinet of course has a group of folders that are available under it, and it is as well tied to a Person. If the Person were to be deleted(morbid), then the FileCabinet would as well.