foam-framework / foam2

FOAM: Feature-Oriented Active Modeller, Version 2
Apache License 2.0
73 stars 63 forks source link

MDAO idIndex cleanup #132

Closed adamvy-google closed 7 years ago

adamvy-google commented 7 years ago

This really shouldn't happen. If were missing some feature from ID support lets file a ticket for that rather than monkey-patch classes on the fly.

Relevant line: https://github.com/foam-framework/foam2-experimental/blob/master/src/foam/dao/MDAO.js#L79

@kgrgreer

adamvy-google commented 7 years ago

Offending commit: a736c585913938eb75c77a0f97abce6a621bebed

kgrgreer commented 7 years ago

Indices are composites (chains), so I should be able to just ask the system to build an Index for the ID and set it to be my delegate without me having to know if it's a multi-part ID or a single-part.

jacksonic commented 7 years ago

This predates IDSupport, IIRC, and I'm looking at it now

jacksonic commented 7 years ago

Original title: MDAO sets this.of$cls.ids = ['id']; It shouldn't mutate the class.

jacksonic commented 7 years ago

This also includes the final refactoring to change the names of some of the index setting methods.

jacksonic commented 7 years ago

Related tasks broken out: #134, #135