Save resource with validation [message #125573] |
Mon, 09 June 2008 20:55  |
Eclipse User |
|
|
|
I have an eCore model that has massive validation implemented with it.
When I create a new object and add it to a resource, when I save the
resource the validation is fired and the object is checked.
However, if I continue to change the same object and set invalid values
in the attributes, the next time I save the same resource, the
validation is not fired.
What do I need to do to make sure the validation is fire every time I
save the resource?
Thanks
Yigal
|
|
|
Re: Save resource with validation [message #125588 is a reply to message #125573] |
Tue, 10 June 2008 02:56  |
Eclipse User |
|
|
|
Hi Yigal,
When doing resource.save the system should end up in the StoreResource.validateContents methods. Can
you check that this indeed happens? There the list of newOrChangedObjects is created. Your changed
object should be in there.
Maybe you have to do: resource.setTrackingModification(true) beforehand (guessing a bit here)?
gr. Martin
Yigal wrote:
> I have an eCore model that has massive validation implemented with it.
> When I create a new object and add it to a resource, when I save the
> resource the validation is fired and the object is checked.
> However, if I continue to change the same object and set invalid values
> in the attributes, the next time I save the same resource, the
> validation is not fired.
>
> What do I need to do to make sure the validation is fire every time I
> save the resource?
>
> Thanks
> Yigal
--
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: Save resource with validation [message #619226 is a reply to message #125573] |
Tue, 10 June 2008 02:56  |
Eclipse User |
|
|
|
Hi Yigal,
When doing resource.save the system should end up in the StoreResource.validateContents methods. Can
you check that this indeed happens? There the list of newOrChangedObjects is created. Your changed
object should be in there.
Maybe you have to do: resource.setTrackingModification(true) beforehand (guessing a bit here)?
gr. Martin
Yigal wrote:
> I have an eCore model that has massive validation implemented with it.
> When I create a new object and add it to a resource, when I save the
> resource the validation is fired and the object is checked.
> However, if I continue to change the same object and set invalid values
> in the attributes, the next time I save the same resource, the
> validation is not fired.
>
> What do I need to do to make sure the validation is fire every time I
> save the resource?
>
> Thanks
> Yigal
--
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.07457 seconds