Problem with mendix id attribute

1
Hello, I would like to read a database in Mendix. For this, the entity must be named according to the column names of the database. However, I have the problem that one column has the name "ID" and cannot be renamed. In Mendix, however, this attribute name is not allowed. How can I solve this problem in Mendix?
asked
3 answers
1

Reading all comments, you are probably connecting to an existing database using the database connector.

Indeed, the id field is prohibited, so if you want to query that column, you need to rename it. For example like this:

SELECT id as _id, column
FROM table

Hopefully this solves your issue!

answered
1

Hi Sophia, 

 

all entities have an attribute ID, which is not adjustable and not visible in the domain model. Because of this, it is also a reserved attribute name (to prevent duplicates etc.). 

 

If you want to add a custom attribute you’ll have to change the name a bit, for example “_id”.

 

EDIT:

Thought you were opening the database with PgAdmin. As Rene states it is not possible to use Mendix on top of a existing database from another application. 

answered
0

If i'm understanding you correctly, you try to use an existing database as the database for your Mendix application. Right?

 

This is not possible in any case. just recreating your database structure as Mendix domain model is not enough to use an existing database. Use the database connector instead to map between your MySQL database and the Mendix application. No need to create a domain model which is 100% equal in naming. 

answered