This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
After some testing I think that LightSpeed designer looks great but I miss some things. I'm usally not huge fan of designers, but I'm trying to use the "right way". - More default values (base class, change of default "track" columns names etc) - Stripping of Table/Column names? - SQL2005.UniqueIdentifer has to manually set to Guid on every table/entity |
|
|
The "SQL2005.UniqueIdentifer" is getting Guid, both the IdentityMethod is set default. It is probably correct, but what about having a "default option for different methods based on the Identity type on the current table" ? |
|
|
The "right way" doesn't have to be the "designer way." It's perfectly possible to write entities by hand in C# or Visual Basic -- the code to do so is relatively concise and it's easy to wrap up the conventional patterns in Visual Studio code snippets. So if you're not a fan of designers then don't feel we're forcing you down that route! Anyway, thanks for your feedback -- we always appreciate comments and suggestions. Could you say a bit more about what you mean by "more default values"? For example you suggest "base class". Are you thinking about having a model-level setting to say "when I create a new entity I want it to inherit by default from MyBaseClass instead of from Entity<T>"? Could you explain a bit more what you mean by '"track" columns names'? Thanks! We've noted your suggestion around stripping table/column prefixes and will see if we can fit in at some point. Regarding SQL Server unique identifiers, the designer should be inferring the identity type as Guid (assuming you are dragging tables rather than creating entities from the toolbox, and that the uniqueidentifier column is the primary key). Is this not working for you, or have I misunderstood the problem? Thanks again for the feedback! |
|
|
IdentityMethod Default means "use the identity method specified on the LightSpeedContext." If different entities/tables need different methods -- e.g. some tables have integer keys and some have GUIDs -- you can override this at the entity/table level to specify a different method for a particular table. We would be cautious about trying to infer an IdentityMethod based on the identity type because a GUID identity type might come from IdentityColumn, Guid or GuidComb, and an int from IdentityColumn, KeyTable or Sequence. Furthermore, we don't know at design time what the IdentityMethod on the LightSpeedContext is, so we don't know whether it needs to be overridden or not. One of the ideas on our radar is pluggable identity methods, so that you could create your own identity method which did choose different strategies depending on the identity type. We won't have that in time for the 2.2 release though, I'm afraid. |
|
|
[quote user="ivan"] The "right way" doesn't have to be the "designer way." It's perfectly possible to write entities by hand in C# or Visual Basic -- the code to do so is relatively concise and it's easy to wrap up the conventional patterns in Visual Studio code snippets. So if you're not a fan of designers then don't feel we're forcing you down that route! [/quote] I have usally using Codesmith to do this work and I will probable end up to use lsgen.exe on large models... [quote user="ivan"] Could you say a bit more about what you mean by "more default values"? For example you suggest "base class". Are you thinking about having a model-level setting to say "when I create a new entity I want it to inherit by default from MyBaseClass instead of from Entity<T>"? [/quote] Yeah, at model-level [quote user="ivan"] Could you explain a bit more what you mean by '"track" columns names'? [/quote] It is probable more easy just to make a own INamingStrategy... |
|
|
I'm agree :) |
|
|
[quote user="ivan"] IdentityMethod Default means "use the identity method specified on the LightSpeedContext." If different entities/tables need different methods -- e.g. some tables have integer keys and some have GUIDs -- you can override this at the entity/table level to specify a different method for a particular table. We would be cautious about trying to infer an IdentityMethod based on the identity type because a GUID identity type might come from IdentityColumn, Guid or GuidComb, and an int from IdentityColumn, KeyTable or Sequence. Furthermore, we don't know at design time what the IdentityMethod on the LightSpeedContext is, so we don't know whether it needs to be overridden or not. One of the ideas on our radar is pluggable identity methods, so that you could create your own identity method which did choose different strategies depending on the identity type. We won't have that in time for the 2.2 release though, I'm afraid. [/quote] I'm agree :) |
|