trying to define image content without committing it.

0
I’m trying to create an image object, define it’s content, add it to a list, repeat, and then commit the entire list.  Currently i’m creating an image object, adding an url to each object in the format of a string attribute,  adding it to a list and iterating through the list calling the community commons java Action “storeURLToFileDocument”. But this java action not just defines the content of the image object, but also commit it to the DB, so in a list of 50 images i make 50  commits.  There is other java action that would not commit the image after defining it’s content, or maybe other solution?
asked
1 answers
1

This Java action calls storeFileDocumentContent and this automatically commits when content is stored.

https://apidocs.rnd.mendix.com/6/runtime/com/mendix/core/component/ICore.html#storeFileDocumentContent-com.mendix.systemwideinterfaces.core.IContext-com.mendix.systemwideinterfaces.core.IMendixObject-java.lang.String-java.io.InputStream-

There isn’t much you can do about this.

answered