Now I have added a Silverlight widget that uses WCF Ria Services to access the data and basically it works.
However I have noticed that the generated code in the Silverlight project shows a limitation of 255 characters for all the memo fields which is a problem.
The problem is that updates do not work for entities, even when the relavant columns have not been changed, I immediately get a verification error back.
Is this a know issue in the code generator?
Any help is appreciated
Joerg
10 Answers, 1 is accepted
We haven't had such issue reported up until now. Can you please share with me the exact version of OpenAccess you are using. The reason I am asking you this is because in versions prior to Q2 we had a problem where our internal concurrency mechanism was interfering with the one used by RIA and that caused all updates to fail.
In order to test this can you please turn off our concurrency mechanism for the class with which you are testing and see if that fixes your problem?
Petar
the Telerik team
NEW and UPDATED OpenAccess ORM Resources. Check them out!
I am using the newest version (Telerik.Open.Access 2011.2.713.3).
Here the detailed info through the various layers (including a screen shot for every item in the list).
- On the SQL Server database I have a user defined data type called MemoText defined as nvarchar(max)
- On various tables I use this datatype, for example the column "ActualStatus"
- In the ORM designer the column is modeled as a string
- In the XML definition of the rlinq file the column ActualStatus is shown with length 0 and ado-type CLOB which is correct.
- On the server side I created a DomainService, but there is nothing special to see
- In the Silverlight project the generated code for the columns which are modeled with nvarchar(max) (or to be more precise the ones with the user defined data type have a max length of 255 chars.
Hope with this information you will be able to reproduce the error.
Regards
Jörg
I have tried the same and I can confirm that the string is not trimmed. I haven't done any additional settings nor have I written any code to handle the string. Is it possible that you have a limitation somewhere in your model that causes the trimming?
If you are willing I will create a sample project for you so that you can test on your side and see if it fails.
Petar
the Telerik team
NEW and UPDATED OpenAccess ORM Resources. Check them out!
I created a small solution that proves my previous statements. Nvarchar(max) get trimmed to string(255) in the generated code file of the Silverlight application. Here the related code snippet of the generated file:
/// <
summary
>
/// Gets or sets the 'Description' value.
/// </
summary
>
[ConcurrencyCheck()]
[DataMember()]
[RoundtripOriginal()]
[StringLength(255)]
public string Description
{
get
{
return this._description;
}
set
{
if ((this._description != value))
{
this.OnDescriptionChanging(value);
this.RaiseDataMemberChanging("Description");
this.ValidateProperty("Description", value);
this._description = value;
this.RaiseDataMemberChanged("Description");
this.OnDescriptionChanged();
}
}
}
I tried to attach the project as a Zip but it is not possible anymore.
Can I send you the project as a ZIP file by mail?
Can you please look into this?
Regards
Jörg
First of all, let me apologize for the late answer.
Using absolutely the same setup I ended up with this code being generated:
/// <summary>
/// Gets or sets the 'Description' value.
/// </summary>
[ConcurrencyCheck()]
[DataMember()]
[RoundtripOriginal()]
public
string
Description
{
get
{
return
this
._description;
}
set
{
if
((
this
._description != value))
{
this
.OnDescriptionChanging(value);
this
.RaiseDataMemberChanging(
"Description"
);
this
.ValidateProperty(
"Description"
, value);
this
._description = value;
this
.RaiseDataMemberChanged(
"Description"
);
this
.OnDescriptionChanged();
}
}
}
Petar
the Telerik team
NEW and UPDATED OpenAccess ORM Resources. Check them out!
Yes I can confirm that I did not add any manual attributes or the like. But maybe our setup is not 100% the same?
I have prepared a demo project that you can download from http://www.evelix.ch/Software/RiaMemoDemoSample.zip
This demo also contains a sql script to create the database.
Can you see any differences to your project? Does it work at your side without the string limitations?
Regards
Jörg
I am sorry for the late replay but we have been busy with the release. I will download your project and your database today and write back as soon as I am able to locate the problem. Thank you for the detailed information you have provided.
Regards,Petar
the Telerik team
NEW and UPDATED OpenAccess ORM Resources. Check them out!
This was confirmed to be a bug on our side that has been fixed.
Greetings,Petar
the Telerik team