Skip to main content



      Home
Home » Modeling » EMF » Nullify string field after deleting its value
Nullify string field after deleting its value [message #1808802] Mon, 01 July 2019 20:17 Go to next message
Eclipse UserFriend
Hello,

I have a problem while trying to unset field values (attributes with lower bound = 1). Putting "Unsettable = true" made no difference.

Before setting a value, the validation is correct and the application warns me about the mandatory field being empty, but not after putting something and then deleting it.

The idea is to export the data filled in the application to a SQL script and feed a DB after, so it's key not to have "" values because it will not work when trying to insert a not nullable field in the DB.

I know there is a boutton in the properties view to restore value to default, but the goal is to get the warning from the application.

To summarize: is there any way to nullify a field after deleting the value that it contained?

Thanks in advance
Re: Nullify string field after deleting its value [message #1808930 is a reply to message #1808802] Thu, 04 July 2019 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi

How did you delete it?

Did you use eUnset() ?

Regards

Ed Willink
Re: Nullify string field after deleting its value [message #1808940 is a reply to message #1808930] Thu, 04 July 2019 13:33 Go to previous message
Eclipse UserFriend
It sounds like he's using the properties view...

If your question how to validate that the empty string is not considered a valid value? You'd need to define your own EDataType that wraps java.lang.String and defines a constraint for which string values you consider valid or not. Is that what you're trying to achieve?
Previous Topic:Read out Genmodel file
Next Topic:Wrap a mutable Java type into a Datatype?
Goto Forum:
  


Current Time: Thu Jul 17 12:10:46 EDT 2025

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

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

Back to the top