imulus/Archetype — pull request #157 by tomfulton (2014-06-24 01:05:45+00:00)
Title: Refactor property aliases for uniqueness

This fixes an issue I ran into, and *might* also fix #155

This refactors the generated property "aliases" to be more unique.

**Old:**

archetype-property---

**New:**

archetype-property---

Basically, this adds the `archetypePropertyAlias` into the mix, to fix a case where you might have the same Archetype nested on a host Archetype twice (ie "Box 1 Links", "Box 2 Links" within the same Archetype - there was no uniqueness inside the "Box x Links" types). This new solution will work for infinitely nested Archetypes (keeps postfixing the new archetypePropertyAlias).

It also adds in the Property Alias in place of the Property "Index" (unintended side effect, but seems cool :))

**Note** My [recursion skillz](https://github.com/imulus/Archetype/compare/fix;unique-aliases?expand=1#diff-32c2318424d5b011a544698c71ada331R59) are terrible and my head was starting to hurt. Could probably use a refactor, but works for now.