This is a migrated thread and some comments may be shown as answers.

XML DataType AND Scope Changes

8 Answers 83 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas Kaske
Top achievements
Rank 1
Thomas Kaske asked on 12 Feb 2010, 04:12 PM
Hello i have 3 important questions which belongs to the ORMapper.

Well i have to store xml in my database (MS SQL Server 2005). I have a column xml in a table which has the type xml. So i can save xmldocuments inside! right now i am using the or mapper for evrerything besides the save of the xml. i save the xmldocument with a normal insert statement before i do that i have to convert the xml document in a mssqlserver xml with a reader.

1. Now my first question is does the or mapper support the xmldatatye because when i use the mapping i can choose every datatpe besides xml!?

2. When I insert the data in my table which has 4 columns id Guid, xml XML, date Datetime, state String. Then I want to see what i have saved the scope doesnt see the insert i made???Why???How can i force him to do that? Scope.refresh????

3. The 3th thing ist that i also have a windows service running. this service changes the states in the table. when the service changes a state in the table thorugh the scope () dont see the change in my GUI when i want to see all data from the table. These are two complete different projects and every project has one scope.?

I would be very glad when someone can help me.

8 Answers, 1 is accepted

Sort by
0
Thomas Kaske
Top achievements
Rank 1
answered on 16 Feb 2010, 06:57 AM
I WOULD REALLY APPRECIATE to get an answer by the way. Our company didnt only buy the ORM Access Components but the Winforms too, so I can expect an answer I hope.
0
Zoran
Telerik team
answered on 16 Feb 2010, 10:33 AM
Hello Thomas Kaske,

The XML datatype is not mapped to a CLR type at the moment. For such unsupported types OpenAccess can serialize them to blobs and present them as byte[] in your object model. Nevertheless I would not recommend that if you have already implemented your custom logic that takes care of the xml objects.

Fore the 2nd and 3rd of your question, I think the answer is that you are not doing the read operations inside an OpenAccess Transaction. The reason why you do not see the objects that you have inserted is that OpenAccess uses its 1st level cache to obtain the requested objects. The cache invalidation happens with the call to scope.Transaction.Begin(). That way OpenAccess will always go to the database and get the latest states of your database records.

With disregard to the technical questions, I would like to tell you that in case you require more rapid answer to your questions, you should send support tickets that are answered with greater priority. The answering time of the Forum posts is 72 hours and they are counted only during business days. That is the reason why this answer has seemed as a late one to you.

All the best,
Zoran
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Thomas Kaske
Top achievements
Rank 1
answered on 19 Feb 2010, 01:24 PM
Hello thank you for the answer that helped me but the question is why doesnt open access see, that i added a new data into the database through the scope? So would you recomend that after i updated inserted deleted some data and want to see it i should alwys a read inside a transaction? Is there an article where I can read that?
0
Zoran
Telerik team
answered on 25 Feb 2010, 07:10 PM
Hello Thomas Kaske,

Yes, you are right, if you want to see the fresh data after insert, update or delete operation you should always read it inside a transaction. At the moment there is no article that explains the reason behind it and we will have to add one for the following release where restructuring of the documentation will be made. Nevertheless, a short and simple explanation is that the OpenAccess caching mechanism can not detect changes in the database that are not performed by OpenAccess itself. That is why it would read the objects from its own cache even if their are modified from another process. The only way for one to be sure that the data that is being read, is the latest is to open a transaction prior to reading the data. That invalidates the cache of the object scope.

Kind regards,
Zoran
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Christian
Top achievements
Rank 1
answered on 12 Apr 2010, 10:48 AM
Hello,
is there a timetable for direct supporting / mapping the xml-datetype in the MS-SQL-Server? This is important question for our product planning.

Thanks.
Christian Rudat
0
Jan Blessenohl
Telerik team
answered on 15 Apr 2010, 04:50 PM
Hi Christian,
It will be in the Q2 release, hopefully in some custom build or service pack earlier.

Greetings,
Jan Blessenohl
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Christian
Top achievements
Rank 1
answered on 03 Jun 2010, 02:48 PM
Hello,
is there any support for the xml-datatype in the current release?
Thanks.
Christian
0
Dimitar Kapitanov
Telerik team
answered on 07 Jun 2010, 09:01 AM
Hello Christian,
As already mentioned on the forum post, a new type mapping and definition system is being developed at the moment. The target release is for Q2 but we are sure we will be able to show something more even earlier.
The system will allow extendability with custom types (I hope even in its first version).
 Hope that answers your questions.

Greetings,
Dimitar Kapitanov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Databases and Data Types
Asked by
Thomas Kaske
Top achievements
Rank 1
Answers by
Thomas Kaske
Top achievements
Rank 1
Zoran
Telerik team
Christian
Top achievements
Rank 1
Jan Blessenohl
Telerik team
Dimitar Kapitanov
Telerik team
Share this question
or