Select with a Where that looks up in a XML column... Possible?
- From: "ThunderMusic" <NoSpAmdanlatathotmaildotcom@xxxxxxxxxx>
- Date: Thu, 10 May 2007 18:08:02 -0400
Hi,
We have a serie of objects stored in the database as xml (ex: MyClass is
stored in the table MyClasses in the field XML_MyClassObj which contains the
an instance of the class serialized to XML). We did that because it was
easier to serialize everything and send it as XML than to build a 25-30
table structure that would become unmanageable.
Unfortunately, a problem arose today. This object uses some other object in
which we must add a method that would break the first object (the one that
is stored in the DB). The question is : Is it possible to do a Select that
would look in the XML_MyClassObj field and tell me if there is an object (of
the second type) with the ID equal to some determined ID we have?
Let's say
MyType1 --instance--> MyObject1--> Uses Obj2Child(MyObject2)-->ID=2;
MyType2 --instance--> MyObject2--> ID=2;
I take the MyObject2 and delete it. MyObject1 then become invalid, but how
can I retrieve that MyObject1 is using MyObject2? Let's remember that
MyObject1 is serialized in XML and is stored in a field in a table.
Is it possible? if so, how?
Thanks
ThunderMusic
.
- Follow-Ups:
- Re: Select with a Where that looks up in a XML column... Possible?
- From: Hugo Kornelis
- Re: Select with a Where that looks up in a XML column... Possible?
- Prev by Date: Re: Where does MS keep registered server info??
- Next by Date: Re: Where does MS keep registered server info??
- Previous by thread: Where does MS keep registered server info??
- Next by thread: Re: Select with a Where that looks up in a XML column... Possible?
- Index(es):
Relevant Pages
|