| [CDO] Deleting a resource from the database [message #729502] |
Mon, 26 September 2011 07:01  |
Missing name Missing name Messages: 17 Registered: September 2011 |
Junior Member |
|
|
I have deleted a CDOResource using
EObject[] roots = resource.getContents().toArray(new EObject[resource.getContents().size()]);
for (int i = 0; i < roots.length; i++) {
EcoreUtil.delete(roots[i], true);
}
try {
resource.delete(null);
} catch (IOException e1) {
e1.printStackTrace();
}
The resource is deleted as it cannot be accessed from any CDO client, but the objects still are in the database, which is very unpleasing since the resource contained ~70.000 elements.
Is there any other way to delete a resource that involves database object removal?
Thanks in advance.
|
|
|
| Re: [CDO] Deleting a resource from the database [message #729512 is a reply to message #729502] |
Mon, 26 September 2011 07:14   |
Martin Taal Messages: 5084 Registered: July 2009 |
Senior Member |
|
|
Hmm, this could be a bug, which CDO version are you on?
gr. Martin
On 09/26/2011 01:01 PM, inbasswetrust wrote:
> I have deleted a CDOResource using
>
>
> EObject[] roots = resource.getContents().toArray(new EObject[resource.getContents().size()]);
> for (int i = 0; i < roots.length; i++) {
> EcoreUtil.delete(roots[i], true);
> }
> try {
> resource.delete(null);
> } catch (IOException e1) {
> e1.printStackTrace();
> }
>
>
> The resource is deleted as it cannot be accessed from any CDO client, but the objects still are in the database, which
> is very unpleasing since the resource contained ~70.000 elements.
>
> Is there any other way to delete a resource that involves database object removal?
>
> Thanks in advance.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
| Re: [CDO] Deleting a resource from the database [message #729708 is a reply to message #729514] |
Mon, 26 September 2011 15:45  |
Martin Taal Messages: 5084 Registered: July 2009 |
Senior Member |
|
|
Seems to be a bug then, the resource's content is mapped with delete-orphan, so I would expect the contents to be deleted.
Can you enter a bugzilla for this?
gr. Martin
On 09/26/2011 01:35 PM, inbasswetrust wrote:
> CDO Version 4.0. Thanks.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.07246 seconds