"Sets GenerateAsNullableOfT" plugin not working on entities on views?

Posts   
 
    
JuergenF
User
Posts: 29
Joined: 23-May-2006
# Posted on: 14-Mar-2008 18:28:09   

Hi, I know the plugin was mainly meant to help the conversion from 1.x to 2.0 projects.

But now I found that fields in entities on views are not generated as nullable by default and thought it could be useful for me (not few of these in my projects...).

But: it seems it works only on 'real' entities, not entities on views. The latter are only marked as changed, but the flags are not (un)set after running the plugin.

I have found the source, but since I don't have the referenced core-projects, I can't experiment myself with it.

So could please someone build this into the plugin for me? I don't think it should be too much work sunglasses

TIA, Juergen

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Mar-2008 22:36:01   

Hi Juergen, only to be sure, I copied this from SDK Reference Manual:

**GenerateAsNullableOfT ** Gets / sets generateAsNullableOfT. If set to true, and the field is nullable, it will be generated as a field of type Nullable(Of this.DotNetType), otherwise as this.DotNetType.

Juergen wrote:

I have found the source, but since I don't have the referenced core-projects, I can't experiment myself with it.

All the dlls you need are inside the LLBLGenPro root installation folder. So remove the references add add them again from that location.

David Elizondo | LLBLGen Support Team
JuergenF
User
Posts: 29
Joined: 23-May-2006
# Posted on: 17-Mar-2008 11:00:16   

and the field is nullable

It seems this is ignored for views - since you can have arbitrary complex expressions in them, I don't wonder why.

I just want to (bulk-)change this property, so that empty dates in my reports aren't shown as 01/01/0001...

All the dlls you need are inside the LLBLGenPro root installation folder.

Ah yes. Seems my brain was in weekend-mode already simple_smile

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Mar-2008 07:01:24   

It seems this is ignored for views - since you can have arbitrary complex expressions in them, I don't wonder why.

Isn't ignored, as far as I've tested. Anyway, you can modify the plugin. How are you going about that?

David Elizondo | LLBLGen Support Team
JuergenF
User
Posts: 29
Joined: 23-May-2006
# Posted on: 18-Mar-2008 11:28:36   

Isn't ignored, as far as I've tested.

Hm. Then my (entities on) views are somehow different (I don't know how, normal views actually).

I marked them all, set the plugin to 'set nullable to true' and ran it. Then I opened some of these entities in designer, and no field was set to nullable.

After that I tried with an entity on a table and it worked as expected...

Anyway, you can modify the plugin. How are you going about that?

Slowly wink I don't know how long debugging the plugin would take me, so I bit the bullet and switched the datetime fields to nullable manually...

Maybe I'll find some time in the next few days, but probably there are other things to do disappointed

But anyway, thank you for your help.