Cannot insert an entity in the database

15 Oct '14, 03:47 PM
67,021 Views
No Forum Badges

Hi all,

I've got an entity called Requester that's a subclass of User. Now if someone registers as a Requester he has to be inserted into the database. However, once I try to insert it using a create operation it won't do anything. What am I doing wrong?

I follow these steps

  1. A form based on the Requester (with the entity field wizard).
  2. A data flow to an action
  3. A filter to check if the username is not already taken, if it is a OK to an error field else a OK flow to the action
  4. the action is defined as a OK flow from the input port that expects a Resquester object to a create statement that has the Entity Requester. 
  5. Then a KO and OK flow the the KO port andthe OK port.

However, the Requester is not added in the database. If I set the Entity of the create in the action to User, a User is made in the database... So what goes wrong?

 
x 1
Follow
Answer Answer at this question and get points!
Forum Expert - Level 6

Hi,

the Create Operation is meant to work with any kind of entity defined into the Domain Model (persistent, volatile and subclasses).

If the entity you use is a subclass of another entity the Create Operation also create the instance of the super entity.

So in your case, with the Form, the Object and the Operation all set to work on the Requester entity it should also create the related instance for the User entity.

From what you wrote you have to change the Data Flow of the Form into a Normal Navigation Flow, otherwise the user won't be able to see a submit button.

Other points seems to be OK but I suggest you to :

  • run the find model problems procedure (maybe there are model errors)
  • place a breakpoint on the action and try to inspect the execution

Let me know if inspecting the model helps you to find the problem.

Regards,

Lucio

   
x 1
Answer at this question and get points!

Related questions

502 proxy error-generate and run Access Denied when I try to download Webratio Platform from Student Access Denied when I try to download Webratio Platform from Student Area Adding and deleting from the database Agregar boton de cambio de contraseña en el login Alimentar graficas con base de datos Atributos Condicionales heredados Attribute comparison in a selector unit [beginner] - How to store and browse data collected with BPM app? Business object data Cancellare campi e tabelle dal database Cannot add a Database in the Domain Model Cannot connect to MySQL Can not get generate and run option for DataService Project Cannot invoke method selectSingleNode() on null object Can't generate and run database or start tomcat server! Change uplod directory and protect anauthorized access to files Como mostrar una imagen en una lista o en la componente detalles? Como recuperar todos los atributos de una relacion N:N y insertar registros? Compare with the current time Component computation Conexion a Oracle 12g Connection refused. connect to Cloud Convert data in a Calculated attribute Convert selector component result to single value Creación DB Apache Derby - Modelado BPMN Criptare dati sensibili nel database Database connection, Host and Port number Database password encrypting Database properties Database resource consumption Database Tables Creation After Remote Deploy Data flow from a page which is not visible anymore DB in Data Service Project Dependencies installation error Deploy in Cloud Amazon Beanstalk with Postgres Dynamic data type Empty record mistakenly saved error activating student account Error updating metadata process Estado HTTP 404 - No está disponible el Servlet action EverLasting error "The TCP/IP connection to the host has failed. Connection refused" Execute truncate sql query file analysis then update MySQL database Find Model Problemas Foriegn key relationship Generate and run locally on webratio professional edition. getting data from database Groovy and Database Guardar Saltos de LINEA help for web project Hide a form if condition if true Hide form until a flow is triggered Hiding landmarks (or flows) when the user is logged in How can I import a view in the Domain Model as an attribute of an Entity? How database or datamodel migration? How I can receive the primary key value after adding into database from OK Port. How to block empty string in Database How to disble derby database? How to fix Network error(status 0) How to run web app with authentication service How to show certain values derived from relations in the domain model? How to use GoogleGeocoding Add-on I can't run any application with WebRatio (Table/View 'APP.POST' does not exist) Image in List field Insert data into database Installation On MacOS Is it possible to create a derived relationship between databases? JDBC4 Postgresql Driver JDBC connection with mysql on mac Job not start correctly Login Error Mapping database of the entity '...' is unspecified [MOBILE] Can't synchronize domain model with beck end DB Mostrar datos de diferentes tablas/ show dates from diferentes entities MS SQL server jdbc file multi selections field problem MySQL Driver jdbc Need help with Landmark No Apache Derby driver found No cloud accounts available No Database on Cloud account No database on my cloud account Passing JSON Object to Model Personalizzare lo stile di un progetto PostgreSQL Predefined values in database Primefaces Problem accessing MySQL with WebRatio 6 Problema Grafo da una lista gerarchica Problema ¨HTTP Status 404" Problemas con el Operations View Delete problemi installazione su Mac sistema operativo OSX El Capitan Problem saving multi selection from input Problems to connect Sql Server DB from Webratio Problems with Database Metadata Problem with fields with accents used in attribute condition Problem with query unit! Problem with stored procedure Problem with the deletion of more than 50.000 records in a table publish web service for storing information in PostgreSQL DB following XSD Resource query a database Refresh and Synchronize DB Problems Relaciones Removing the User-Group-Module tagles Retrieve a value and add some value to it reverse engineering, problema con le relazioni di default Script Unit e Mysql Share database connection Showing items that have a relation with an entity Simulation Software Solve "Generation Error" with Generate and Run option Statistics Component for WebRatio > 7.2.0 Status ProcessInstance and activityInstance in spanish Student reserved area, download error Sybase JConnect 4 JAR replace Sync DataService Project with Mobile Project Table 'freeapp43.profesion' doesn't exist Tarea de servicio no me evalua el valor Trying to Synchronize Domain Model Unable to download WebRatio from Student Area Unable to execute the script java.lang.NullPointerException Unable to find Cloud free function Unable to start WebRation, cannot locate its companion shared library Unknow property on Dynaclass after generation Unspecified BPM Engine Database Update mutiple records with the same value Updating attributes of an entity upload file and the move it to other location User Login Timestamp Username come chiave Using own User and Group tables WebRatio activation problem Web ratio data model WebRatio freezes at project load (Linux) WebRatio - list results of joined tables Web Ratio Mobile and Foreign Key Web Ratio Mobile plateform Macos Sierra Web Ratio Mobile - Remote data mapping problem WebRatio no imports all attributes (fields) of a table WebRatio y Java 1.8 (o superior) Where is the ACME demo data stored?! White report XPCOM Error