and once again I write to you to describe an issue i have found ;) Sorry for bothering you again ;)
The issue i stumbled upon is with Many to Many
relationships between entities.
However, i am NOT able to properly query (!) the members of an organization. Consider this query:
{
"data": {
"organizations": {
"edges": [
{
"node": {
"id": "46fb76f1-781b-400b-8932-43ee9e809d1e",
"members": {
"edges": [
{
"node": {
"id": "3727f166-ceb4-4693-9376-69e8be34c9d1"
}
}
]
}
}
},
{
"node": {
"id": "ea23adb4-8e29-40c2-bf33-75e6064266c5",
"members": {
"edges": [
{
"node": {
"id": "3727f166-ceb4-4693-9376-69e8be34c9d1"
}
}
]
}
}
},
// ... many more entries
]
}
}
}
query: SELECT "OrganizationEntity"."id" AS "OrganizationEntity_id", "OrganizationEntity"."createdAt" AS "OrganizationEntity_createdAt", "OrganizationEntity"."updatedAt" AS "OrganizationEntity_updatedAt", "OrganizationEntity"."version" AS "OrganizationEntity_version", "OrganizationEntity"."name" AS "OrganizationEntity_name", "OrganizationEntity"."description" AS "OrganizationEntity_description", "OrganizationEntity"."type" AS "OrganizationEntity_type", "OrganizationEntity"."address" AS "OrganizationEntity_address", "OrganizationEntity"."phone" AS "OrganizationEntity_phone", "OrganizationEntity"."email" AS "OrganizationEntity_email", "OrganizationEntity"."url" AS "OrganizationEntity_url", "OrganizationEntity"."logo" AS "OrganizationEntity_logo" FROM "organizations" "OrganizationEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
query: SELECT "DoctorEntity"."id" AS "DoctorEntity_id", "DoctorEntity"."createdAt" AS "DoctorEntity_createdAt", "DoctorEntity"."updatedAt" AS "DoctorEntity_updatedAt", "DoctorEntity"."version" AS "DoctorEntity_version", "DoctorEntity"."keycloakId" AS "DoctorEntity_keycloakId", "DoctorEntity"."title" AS "DoctorEntity_title", "DoctorEntity"."firstname" AS "DoctorEntity_firstname", "DoctorEntity"."lastname" AS "DoctorEntity_lastname", "DoctorEntity"."phone" AS "DoctorEntity_phone", "DoctorEntity"."email" AS "DoctorEntity_email", "DoctorEntity"."url" AS "DoctorEntity_url", "DoctorEntity"."picture" AS "DoctorEntity_picture", "DoctorEntity"."lastLoginAt" AS "DoctorEntity_lastLoginAt", "DoctorEntity"."acceptedTOS" AS "DoctorEntity_acceptedTOS", "DoctorEntity"."settings" AS "DoctorEntity_settings" FROM "doctors" "DoctorEntity" LIMIT 10
Furthermore, this query does only work "from this side". When querying from the other side (like this), this results in an error:
error: error: column OrganizationEntity.organizationsId does not exist
and of course it does not exist, because respective column should be located within the organization_members
table.