Developer forum

Forum » Development » Item types using Code First don't generate database schema

Item types using Code First don't generate database schema

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

 

I created a few item types using code first. They show up correctly when I create a new page but when I try to create the page I get an error indicating the underlying item tables does not exist (which is indeed the case). I have to go to Management Center, find my item type, open it, and then save the changes in order for the database table to be created.

 

Is this by design? Or is this a bug? I am using the latest DW version: 8.2.2.6.

 

Imar

 


Replies

 
Vladimir
Reply

Hi Imar,

This is probably a bug. Related item table should be generated at application startup.

 

Best regards,

Vladimir

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Vladimir,

 

Thanks for confirming. Should I report this or are you looking into it?

Imar

 
Vladimir
Reply

By the truth I tried to reproduce that on head and DW8.2.3 version, but without success:( (i.e. db scheme was created succesfully)

May you send me example?

 

Best regards,

Vladimir

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I tested it again, and it now no longer reproduces for me. Must have been database gremlins messing with my code... ;-)

 

Thanks,

 

Imar

 

You must be logged in to post in the forum