addReference() don't work well !!

hi,

no error in execution but no result for addreferce() method in order to join 2 tables

                     query = new TableQuery("table1", c.getconnection()); 
                    query.setVersionColumn("id"); 
                    temp = new SQLContainer(query); 
                    
                TableQuery query1 = new TableQuery("table2", c.getconnection()); 
                    query1.setVersionColumn("id"); 
                 temp1 = new SQLContainer(query1); 
                
                temp.addReference(temp1,"id", "ref_table1");