Developer forum

Forum » Feature requests » Items - Generate item class from existing item definition or database table

Items - Generate item class from existing item definition or database table

Morten Bengtson
Reply

It would be nice if we could somehow generate an item class from existing item definition or database table. Would that be possible?


Replies

 
Kristian Knudsen
Reply

It could be :)

As a first thought we could maybe extend the Code generation tool from the Management Center so you can use that for the class generation.

 
Morten Bengtson
Reply

Hi Kristian,

 

Extending the existing code generation tool sounds like a good solution. If you decide to do so, it would be great if you could make it possible to provide custom code generation templates, maybe in the /Files/System folder. The current templates used for code generation is in the /Admin/Module/CodeGen folder. We could make changes to those templates, but the changes are "lost" when the site is upgraded and it just feels wrong to mess around with files in the Admin folder.