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, biapar, Willr, Ingo, swaiba, simon_w

Duplicate Group 'Codes'


Reply


3 Posts   664 Views

Avatar
dizzystuff

Community Member, 93 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.

Cheers
dizzy

Avatar
Willr

Forum Moderator, 5513 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.

Avatar
dizzystuff

Community Member, 93 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 :)