Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Duplicate Group 'Codes'

Go to End

3 Posts   860 Views


Community Member, 94 Posts

13 June 2010 at 6:04pm

I have a handful of groups with a large number of subgroups. Many of the subgroups share a name/title with subgroups under other parents. Upon entry each group gets a 'Code' based on it's title so I now have multiple groups with the same 'Code' in my database.

Can anyone tell me if this will create a problem? I haven't come upon any issues yet but still need to give it a full testing.



Forum Moderator, 5523 Posts

14 June 2010 at 1:11pm

Hmm AFAIK code should be unique (kinda like URLs), I guess most modules should use IDs rather than the codes so you should be fine. The 1 place where you would have trouble is the functions addToGroupByCode which would of course cause issues.


Community Member, 94 Posts

14 June 2010 at 9:44pm

Ok, great, that's exactly the info I was looking for. I'll jump into the db and make sure the groups all have unique codes (for this site once the groups are setup they'll be pretty static), as a 'just in case' kind of thing.

Is this a bug then? Should there be some sort of validation here?

thanks :)