CMDBuild Forum

Unable to retrieve cards when adding new domain

Hi folks, 

I have two cards and a domain that relates both of them.  When I go to create a new domain, I'm unable to retrieve existing cards and I get the following error.  Any ideas what this means?

org.cmdbuild.dao.DaoException: error executing query = 'SELECT (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "IdObj1" = 17871 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "Status" = 'A')) _fordomainhasanyrelation, "Id" _id, "IdClass"::regclass _idclass, "CurrentId" _currentid, "User" _user, "BeginDate" _begindate, "EndDate" _enddate, "Status" _status, "ArchimateID" _archimateid, "Code" _code, "Description" _description, "IdTenant" _idtenant, "Name" _name, "Notes" _notes, "Type" _type FROM "TechnService" _technservice 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 "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "IdObj1" = 17871 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "Status" = 'A')) _fordomainhasanyrelation, "Id" _id, "IdClass"::regclass _idclass, "CurrentId" _currentid, "User" _user, "BeginDate" _begindate, "EndDate" _enddate, "Status" _status, "ArchimateID" _archimateid, "Code" _code, "Description" _description, "IdTenant" _idtenant, "Name" _name, "Notes" _notes, "Type" _type FROM "TechnService" _technservice 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

I noticed this too with 3.1
I recently build an empty database, all I did was build two classes and tried to join them with a 1:1 and 1:N domain and got the same errors:
 
org.cmdbuild.dao.DaoException: error executing query = 'SELECT (Q3_MASTER."Id" IN (SELECT "IdObj1" FROM "Map_DomainTest2" WHERE "IdObj2" = 216 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj1" FROM "Map_DomainTest2" 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 "DomainSource1" _domainsource 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_DomainTest2" WHERE "IdObj2" = 216 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj1" FROM "Map_DomainTest2" 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 "DomainSource1" _domainsource 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
 
Previously Geto wrote:

Hi folks, 

I have two cards and a domain that relates both of them.  When I go to create a new domain, I'm unable to retrieve existing cards and I get the following error.  Any ideas what this means?

org.cmdbuild.dao.DaoException: error executing query = 'SELECT (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "IdObj1" = 17871 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "Status" = 'A')) _fordomainhasanyrelation, "Id" _id, "IdClass"::regclass _idclass, "CurrentId" _currentid, "User" _user, "BeginDate" _begindate, "EndDate" _enddate, "Status" _status, "ArchimateID" _archimateid, "Code" _code, "Description" _description, "IdTenant" _idtenant, "Name" _name, "Notes" _notes, "Type" _type FROM "TechnService" _technservice 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 "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "IdObj1" = 17871 AND "Status" = 'A')) _fordomainhasthisrelation, (Q3_MASTER."Id" IN (SELECT "IdObj2" FROM "Map_C_B_T_F2S_R" WHERE "Status" = 'A')) _fordomainhasanyrelation, "Id" _id, "IdClass"::regclass _idclass, "CurrentId" _currentid, "User" _user, "BeginDate" _begindate, "EndDate" _enddate, "Status" _status, "ArchimateID" _archimateid, "Code" _code, "Description" _description, "IdTenant" _idtenant, "Name" _name, "Notes" _notes, "Type" _type FROM "TechnService" _technservice 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