https://bugs.freedesktop.org/show_bug.cgi?id=56358

          Priority: medium
            Bug ID: 56358
          Assignee: [email protected]
           Summary: : Master/Slave linking problem when there is no master
                    data in external datasource.
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
        Whiteboard: BSA
            Status: UNCONFIRMED
           Version: 3.6.2.2 release
         Component: Database
           Product: LibreOffice

Created attachment 69003
  --> https://bugs.freedesktop.org/attachment.cgi?id=69003&action=edit
Working HSQL example

Problem description: 

I have a master form and a slave form.  It appears that if the master form
doesn't have any data in it for the slave form to access, the slave form is
broken for the rest of the session.

For example, I have:
Table1
  Table2
    Table3

Table 3 is linked to table 2, which is linked to table 1.

If the first record in table 1 doesn't return any records in table 2, then
table 3 doesn't have any master data OR slave data, and it breaks with the
error message:

SQL Status: 42883
ERROR: operator does not exist: integer = character varying
  Hint: No operator matches the given name and argument type( s ). You might
need to add explicit type casts.
  Position: 53

The SQL command leading to this error is:

SELECT * FROM "public"."sys_pos" WHERE ( ( "sys_id" = :link_from_sys_id ) AND (
"model_id" = :link_from_model_id ) ) AND ( 0 = 1 )[/quote]

It appears to only happen when linking to a jdbc datasource (I was unable to
reproduce the problem with an internal HSQL database).  I think the problem in
this example is that there is no :link_from_sys_id available, so the query
konks out, and that form doesn't work for the remainder of the session, even if
you move to a record that has that link available.

I've attached an HSQLDB with a form that WORKS for reference, but if you
attempt this same thing with an external datasource, it errors.  This has been
an ongoing problem since I started using LibreOffice (around 3.4).


Steps to reproduce:
1. Link to External DB
2. Create 3 Tables with linking fields in external db.
3. Create 3 levels of subforms in a Base form.

Current behavior:
If there is no data in the master form, the query to retrieve the subform data
errors out.

Expected behavior:
If there is no data in the master form, the query should not attempt to
retrieve data for the subform.

Platform (if different from the browser): 

Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.16 (KHTML, like
Gecko) Chrome/24.0.1297.0 Safari/537.16

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to