In README.txt, there is the following statement. I do not understand the sentence I have bolded.

1. The first step is to customize your table in module.install by adding any column tables specific to your entity.

Your would only every really need to change the Model entity and Model type as ModelType is simply there to provide a means to represent your different entity bundles.

Also keep in mind that if you can get away with adding data only in serialized form in the data column you can avoid doing anything to the tables.

In model_schema(), I see 'model' and 'model_type'. What is 'ModelType'?

Comments

femaltol’s picture

After I saw the question from August1914 here it finally clicked for me, I already suspected that but the wording was throwing me off.

ModelType is there only to represent the different bundles, so you can leave it as is.

Just customize the Model related stuff to suit your needs, the table in install, the controller in model.admin.inc, the templates and whatever else you want. ModelType related stuff is only there to support the creation of the types of entities.

Say you create a patient entity and a appointment entity, you create both types via ModelType, add fields, configure and such.

When you have both types of entities created, you could for example remove permissions for ModelType related stuff and expose only the pre-created entity types (patient, appointment) for the end user to create, and he would not even know about any ModelType gobbledygook.

That's the way I understood it, but it may be completely wrong, as i am still learning, so take it with a grain of salt. :-)