Hello,
I'm using version 3.1 and got error while tried add relations any case when objects exists or not exists.
org.cmdbuild.dao.DaoException: error executing query = '
SELECT (Q3_MASTER."Id" IN (
SELECT "IdObj1" FROM "Map_CountourBuilding"
WHERE "IdObj2" = 4426 AND "Status" = 'A')
) _fordomainhasthisrelation,
(Q3_MASTER."Id" IN (
SELECT "IdObj1" FROM "Map_CountourBuilding" WHERE "Status" = 'A')
) _fordomainhasanyrelation, "Id" _id,
"IdClass"::regclass _idclass,
"CurrentId" _currentid,
"User" _user,
"BeginDate" _begindate,
"EndDate" _enddate,
"Status" _status,
"Code" _code,
"Description" _description,
"IdTenant" _idtenant,
"Notes" _notes
FROM "Network_contour" _networkcontour
WHERE "Status" = 'A'
ORDER BY _description ASC LIMIT 100',
caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback;
bad SQL grammar
[SELECT (Q3_MASTER."Id" IN (
SELECT "IdObj1" FROM "Map_CountourBuilding"
WHERE "IdObj2" = 4426
AND "Status" = 'A')
) _fordomainhasthisrelation,
( Q3_MASTER."Id" IN (
SELECT "IdObj1" FROM "Map_CountourBuilding" WHERE "Status" = 'A'
)) _fordomainhasanyrelation, "Id" _id,
"IdClass"::regclass _idclass,
"CurrentId" _currentid,
"User" _user,
"BeginDate" _begindate,
"EndDate" _enddate,
"Status" _status,
"Code" _code,
"Description" _description,
"IdTenant" _idtenant,
"Notes" _notes
FROM "Network_contour" _networkcontour
WHERE "Status" = 'A'
ORDER BY _description ASC LIMIT 100];
nested exception is org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "q3_master" Position: 9, caused by: org.postgresql.util.PSQLException: ERROR: missing FROM-clause entry for table "q3_master" Position: 9