Bug In Designer & Questions

2 posts, 0 answers
  1. Jack
    Jack avatar
    45 posts
    Member since:
    Feb 2009

    Posted 26 Jan 2011 Link to this post

    1) If you make changes to the model settings (RightClick -> Show Model Settings) and then drag a new view/table across it doesn't pick up the updates unless you save, close, and reopen the .rlinq.

    2) How do you 'refresh' a single object?  I created a few objects and I wanted to globally change the model settings.  I don't see how I can re-apply the name conventions.

    3) What is the difference between Field & Property in the Model Settings?

    4) I use Oracle Views extensively which don't have the concept of primary keys etc.  If I edit the MetaData.MetaView and flag a column as being a PK and then I refresh from the DB will that update be lost or should it be maintained?

    5) I am finding it very very slow to add/update new objects from the schema.  I am only concerned with a single schema but I'm pretty sure I am getting everything loaded.  Then I choose my schema and I wait again while it does a massive compare.  Is there a way that it is just cached?  I don't want to wait 2 mins just to add a single entity.  I have ~180 tables, 200+ views, and a dozen packages with umpteen procs in each of them.

    6) Is there a way to apply some conventions?  For example I always call Yes/No fields as some_field_ind varchar2(1) and use 1/0.  I would like that to always come across as a bool SomeField.  I also rarely use a precision on the number fields so the default is detecting everything as number(22) and mapping to Int64.  I don't want that.  I also have a convention for all my PK/FK where I use some_key_field_id number.  Those I have coded currently as Int32 although I could see myself bulk changing to Int64 one day.  Regardless is there a way to set the default number conversion to Int32?


  2. Alexander
    Alexander avatar
    727 posts

    Posted 31 Jan 2011 Link to this post

    Hello Jack,

    1) This was indeed an issue with the Model Settings dialog which has been fixed in the latest internal build (version 2010.3.1306).

    2) I am afraid that the naming settings are applied only to new classes. Currently there is no way to "refresh" the existing classes as this would break your code, if you are already using the classes.

    3) The field rules are applied to the private fields of the generated classes while the property rules are applied to the public properties which expose the private fields. There are cases when the field and properties should have different names (for example in VB.Net) and this allows to set the naming rules separately.

    4) Yes, this would be detected as a difference because the schema read from the database and the one available in your domain model have different information about this column. You should not normally need to set a column as primary key, the only thing you need to do in order to use views is to enable the Identity setting for one or more of the properties of the meta class.

    5) If your database contains multiple schemas, we are reading only their names and when you choose the ones to update from, their full definition is read. I am afraid that there is not much that can be optimized in this process.

    6) With the last Q3 release we introduced a new type conversion framework which allows to define custom type converters. I think you will be able to use such custom converter to map number columns to Int32 fields but this would require some code to be written additionally to your domain model. Please let me know if this would work for you, so I can provide you with more details.

    I hope that helps.

    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
Back to Top