Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Save resource with validation
Save resource with validation [message #125573] Mon, 09 June 2008 20:55 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Save resource with validation
Next Topic:[Teneo] JMX MBean and class loading issues
Goto Forum:
  


Current Time: Sun Jul 13 06:40:52 EDT 2025

Powered by FUDForum. Page generated in 0.07457 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top