Hey, when we import views we don't seem to have any control over the inferred keys and thus null columns.
With the ms sql version the workaround is to use nulliff and isnull (http://stackoverflow.com/questions/1013 ... w-question).
This doesn't seem to be working with dotconnect postgres, it seems you are making a column a key and not null if it is a pk in a joined view but this defeats left joins.
We like left joins here and really need control over inferred keys and the null-ability of those columns or we are going to be left hand editing the edmx after every update from the db.
In the short term is there a template code generation file I can edit to work around this?
Inferred view key - obey nulliff isnull
-
- Posts: 3
- Joined: Sat 14 Apr 2012 15:21
- Contact:
Re: Inferred view key - obey nulliff isnull
We recommend you using Entity Developer (the Devart Entity Model item, *.edml) - it will create an entity basing on your view, and you will be able to set its EntityKeys easily in the design time. After this to preserve settings from overriding, clear a selection for this view in Update Model From Database every time when running the wizard.
-
- Posts: 3
- Joined: Sat 14 Apr 2012 15:21
- Contact:
Re: Inferred view key - obey nulliff isnull
Shalex wrote:We recommend you using Entity Developer (the Devart Entity Model item, *.edml) - it will create an entity basing on your view, and you will be able to set its EntityKeys easily in the design time. After this to preserve settings from overriding, clear a selection for this view in Update Model From Database every time when running the wizard.
Cool, I hadn't really dug into working with edml yet and didn't realize I got it with the pro dotconnect. I will start working with it today, thanks for the response :>