How Do the Mechanical Parts of a Die Cast Lock Get Inside?

I understand the manufacturing process for a laminated lock, but cannot figure out how the mechanical workings end up in a die cast lock and still work. Clearly the parts are too large to fit in through the hole made by inserting the key plug, and the parts would be unable to move if they were cast in. So how do the mechanical workings still operate inside the die cast body? I understand the basic concepts of using cores to make gaps in a die cast, but how would that work for say, a brass die cast lock?