开发者

Changing the CreatedBy convention in SubSonic (3x)

开发者 https://www.devze.com 2023-02-15 04:55 出处:网络
I\'m working against a database that wasn\'t designed by me and in all the tables there is a CreatedBy field that is an int. Now when I generate against this database I get all kinds of errors, becaus

I'm working against a database that wasn't designed by me and in all the tables there is a CreatedBy field that is an int. Now when I generate against this database I get all kinds of errors, because SubSonic is expecting that field to be a varchar.

I don't particularly want to go and rename the field in all of the开发者_JS百科se tables so I was hoping there was a way to "alter" or change the internal convention (without getting into the source) in SubSonic.

Has anyone been able/done this in SubSonic 3.0.4??

I'm using the active record model in SubSonic 3.


After much research and pouring through the source there is no simple way of doing this. I renamed all the columns to CreatedById and I'm good to go.

It sucks that you can't override this convention, but I definitely "get it".

0

精彩评论

暂无评论...
验证码 换一张
取 消