tags:

views:

128

answers:

2

Hello, I am using SS 2.1 and just starting out with it. I got everything loaded and it works for the simple tests I've been doing, but a general question: Is there a way to update my build without having to rebuild the entire thing, an example would be if we change the layout of a table. Lets say we have a id, and name, and then later on add id, name and disabled. Is SS smart and able to pick that up or would it require a new build? Thank you very much for your time.

Cheers

+1  A: 

I believe you use a command-line app to generate your mapping files, so that command-line app would have to be re-run for that to happen. Second, the mapping code would have to be compiled on the fly after insert...most .net application do not do this.

But the biggest reason you would not want the mappings to be generated on the fly: speed. It takes time to do that, several seconds at least. Then how would you time it? Not every call -- that would be insane. Once a day? when during the day?

So no, SubSonic only generates the mapping files when you ask it to. If you change the database you risk breaking your application.

Chris Brandsma
A: 

If you are using the build provider with ASP.NET, building your project will make SubSonic catch the change and update the generated classes.

Otherwise you will need to use SubCommander to generate the classes again.

Robert S.
It will only make the change when the abp file is modified though. It still doesn't 'just do it'. Doing a build doesn't modify that file either.
ranomore