Bug 45148 - : Base is changing variable datatypes when linking subforms.
Summary: : Base is changing variable datatypes when linking subforms.
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-23 12:48 UTC by pfreeman99
Modified: 2017-11-10 12:02 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pfreeman99 2012-01-23 12:48:17 UTC
Problem description: When using the postgresql JDBC driver, linking a subform to another subform appears to convert the linking parameter to a character varying datatype.  So when the filtered field is something other than text, you get an operator error when you try to filter on that linked parameter.

This isn't a problem when linking a masterform to a subform, only when linking a subform to another subform. 

Steps to reproduce:
1. Create a form based on a postgresql db table (say customer_id, customer_name)
2. Create a subform1 (level 1), linking an integer field (say customer_id, customer_orders)
3. Create a subform2 (level 2), linking the same integer field (say customer_id, order_id, item_no)

Current behavior: Between subform 1 and subform 2, customer_id is converted to a text datatype.  So by the time subform2 gets the customer_id, it's text rather than an integer, and errors out when it tries to filter.

It would appear that subform 1 is being auto-built on a query of the master form (SELECT * from orders where customer_id = link...) and this resultset is being put into some type of temp table, where all the fields are stored as text.  So when subform 2 tries to join subform 1, it errors when trying to join on an integer datatype.

Expected behavior: You would expect the data to keep the same type throughout the process.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.16 (KHTML, like Gecko) Chrome/18.0.1003.1 Safari/535.16
Comment 1 Lionel Elie Mamane 2012-02-02 02:57:47 UTC
Does this happen only with PostgreSQL/JDBC or also with other drivers or other databases?
Comment 2 Lionel Elie Mamane 2012-02-29 03:17:01 UTC
It would be great if you attached an example .odb file and database dump (pg_dump) to reproduce the issue.
Comment 3 Jochen 2012-08-24 21:58:55 UTC
@reporter:
Please attach an example .odb file and database dump (pg_dump) to reproduce the issue.
Comment 4 Jochen 2012-09-02 10:12:03 UTC
@reporter:
Please attach an example .odb file and database dump (pg_dump) to reproduce the
issue.
Please answer the questions. Otherwise this bugreport will be closed.
Comment 5 Jochen 2012-09-15 16:18:03 UTC
Reporter don´t answer.
Changed status to "RESOLVED WORKSFORME"