One to Many, and Many to Many relationship using CRUD

Hi there.

This is the cenario: I have an entity, that has a set of records, half way of development , I was asked to add 1 more entity, and I literally dont know how to create records with both entities, giving the fact that some of the IDs of "Names" have to be associated with the newly created "City" entity. Can anyone help me?

mvp_badge
MVP

Hi Henrique,


When you use a CRUD action like Create<Record>, you will have the newly created id as an output to use on the following CRUD actions. Take a look on the example below where after creating a city, the id of the created record is used as the foreign key in the municipality:



Kind Regards,
João

Hi Henrique,

Whenever you create an attribute the OutSystems will automatically generate its identifier to column uniqueness.

The OutSystems can manage(created) its crud operations at the time you create an entity.

Try to change the reference key of Municipality by giving identifiers to the city id.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.