interchange / interchange6-schema

DBIC schema for Interchange 6
8 stars 7 forks source link

proposal: make Navigation uri column nullable #178

Closed SysPete closed 9 years ago

SysPete commented 9 years ago

This is handy in some instances where I want a parent nav that doesn't need (or want) a uri. If this change is made then we also need to remove the override of insert which auto-generates uri from name.

hexfusion commented 9 years ago

With a the large range of functionality of the Navigation class I think this will add additional usability for menus. @racke do you currently use the auto-gen ^^.

racke commented 9 years ago

Yes, I'm using the autogeneration. Can't we force NULL value by passing NULL when we create Navigation record?

SysPete commented 9 years ago

At the moment we override insert at which point the object is fully inflated so we can't tell whether uri was passed as an undef arg or not passed at all. Perhaps the autogen stuff could be moved elsewhere - to be investigated.