Try our conversational search powered by Generative AI!

Deleting MetaClass Not Working (Commerce 11.2.5)



I have renamed a load of my classes and change their MetaClassName in code. I have compeltely cleared my catalogue and tried deleting these meta classes that no longer exist and although they say deleted as soon as I restarted IIS they are back. Due to this they are coming up as availible types in the catalogue when trying to add items on the MainCatalog.

Is there some way of actually making these go away?

Edited, Oct 10, 2017 17:00

How did you go about trying to delete the meta classes?

For the catalog classes they should be stored in [commercedb].[dbo].[MetaClass].

Does it contain your new classes?

Does your old ones disappear from that table when you try to delete them?

Oct 11, 2017 13:13

I see what the problem is, they are actually my base types that my commerce items are inheriting. It's creating meta classes for these base types when they don't have a CatalogContentType on them which is different to how the CMS models work. Do you know how to stop this?

Oct 11, 2017 13:18

Would decorating them with the attribute and setting AvailableInEditMode to false at least remove them from the types that can be created? Commerce always seems to work just a little bit different than the normal CMS models?

Oct 11, 2017 13:20

Can you provide an example on your implementation of your catalog classes?

Both the base class and the actual implementation you are using?

Oct 11, 2017 13:22

Thanks I've figured out what it was, some of my new base types I'd forgotten to make abstract and therefore commerce was generating items for these. Now I've marked the base types as abstracted and cleaned them out all is good.

Thanks for the council :-)

Oct 11, 2017 13:29
<p>It does indeed seem that you are correct, setting:</p> <pre class="brush:csharp;auto-links:false;toolbar:false" contenteditable="false">[CatalogContentType(GUID = "", DisplayName = "", AvailableInEditMode = false)]</pre> <p>Is how episerver themselves hides their own base classes.</p>
Oct 11, 2017 13:30

Indeed, abstract is even better cool

Oct 11, 2017 13:31
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.