PostgreSQL Flat view

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

PostgreSQL Flat view

Timo Nisula
Hi,
I have installed Orbeon PE on self made docker container which contains tomcat (9.0.30), Orbeon 2019.2 PE and PostgreSQL JDBC drivers (42.2.9). In other docker container I have PostgreSQL 12.

I get it to work, but for some reason flat view not work properly, its add row to table but my own field is NULL?

I have following configs

/webapps/orbeon/META-INF/context.xml (I needed to replace docs config because it didn't work...)
<Context>


<Resource name="jdbc/postgresql" auth="Container"
         
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
         
url="jdbc:postgresql://db:5432/orbeon"
         
username="orbeon" password="passu" maxTotal="20" maxIdle="10"
     
maxWaitMillis="-1"/>

</Context>

/webapps/orbeon/WEB-INF/resources/config/properties-local.xml
<!-- Persistence (DB) -->
<property as="xs:boolean" name="oxf.fr.persistence.exist.active" value="false"/>
<property as="xs:string" name="oxf.fr.persistence.provider.*.*.*"  value="postgresql"/>
<property as="xs:boolean" name="oxf.fr.persistence.postgres.versioning" value="true"/>
<property as="xs:string" name="oxf.fr.persistence.*.data-format-version" value="2019.1.0"/>
<property as="xs:boolean" name="oxf.fr.persistence.postgresql.create-flat-view" value="true"/>

What I have missed?

BR,
Timo

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/9f806150-9040-4fec-ac9f-af0c44100e75%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Alessandro  Vernet
Administrator
Hi Timo,

Could you share with us the source of your form, so we can reproduce the
issue here? In Form Builder, you can go to the Advanced tab, Edit Source,
copy the source into a file, and attach that file. (And if this is larger
form, maybe you can create a minimal form, maybe even with just 1 field,
that reproduces this issue.)

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1580515337475-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Timo Nisula
Hi,

Sorry for delay. Here is source as attachement. There is only one text field and and when saved  postgresql database table shows

-Timo

lauantai 1. helmikuuta 2020 2.02.18 UTC+2 Alessandro Vernet kirjoitti:
Hi Timo,

Could you share with us the source of your form, so we can reproduce the
issue here? In Form Builder, you can go to the Advanced tab, Edit Source,
copy the source into a file, and attach that file. (And if this is larger
form, maybe you can create a minimal form, maybe even with just 1 field,
that reproduces this issue.)

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: <a href="http://discuss.orbeon.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF5V5zfD-87RVoalaG4cqO_RzdDcA&#39;;return true;">http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/96413cf2-e298-4340-bf73-0d535814a99a%40googlegroups.com.

test1.xml (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Alessandro  Vernet
Administrator
Hi Timo,

It is my turn to apologize for the delay! I still didn't get a chance to
look into this, but it's on my list. I'll follow-up here as soon as I know
more about is going on.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1581041824329-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Timo Nisula
Hi Alex,

No hurry.  I'm busy with another project right now ☺

-Timo

On Fri, Feb 7, 2020 at 4:17 AM Alessandro Vernet <[hidden email]> wrote:
Hi Timo,

It is my turn to apologize for the delay! I still didn't get a chance to
look into this, but it's on my list. I'll follow-up here as soon as I know
more about is going on.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1581041824329-0.post%40n4.nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAKt4_v3CuhXwoYT_7E1ffyhLQ7ns%3DHWKE1Rcrsk3ddk7Cv9YgA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Alessandro  Vernet
Administrator
Hi Timo,

I tried to reproduce this, but it worked for me. Here is what I tried:

1. I installed a verbatim Orbeon Forms CE 2019.2.
2. I setup a `<Resource name="jdbc/postgresql">` in Tomcat .
3. Used the `properties-local.xml` linked below.
4. Create a form `a/a` in Form Builder, add a field, just so we have at
least 2 fields (for some very extensive testing!), publish, open the `/new`
page for the form, enter a couple of values, saves.
5. Run `select * from orbeon_f_a_a` ⇒ I can see the data entered in step 4.

If you try to follow the above steps, are you also getting the same result?

properties-local.xml
<http://discuss.orbeon.com/file/t119778/properties-local.xml>  

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1582221502803-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Timo Nisula
Hi Alex,

Thanks, I followed your steps and it works.

I also tested add versioning to properties file and it worked also.

But when I added new data format version, it won't work any more.
<property as="xs:string" name="oxf.fr.persistence.*.data-format-version" value="2019.1.0"/>

So the problem is when you have flat view enabled and data-format-version set to newest "2019.0.1" it doesn't save values to database (though it creates table columns). Not sure is this case only with postgresql, not tested other DB's.

BR,
Timo


On Thu, Feb 20, 2020 at 7:58 PM Alessandro Vernet <[hidden email]> wrote:
Hi Timo,

I tried to reproduce this, but it worked for me. Here is what I tried:

1. I installed a verbatim Orbeon Forms CE 2019.2.
2. I setup a `<Resource name="jdbc/postgresql">` in Tomcat .
3. Used the `properties-local.xml` linked below.
4. Create a form `a/a` in Form Builder, add a field, just so we have at
least 2 fields (for some very extensive testing!), publish, open the `/new`
page for the form, enter a couple of values, saves.
5. Run `select * from orbeon_f_a_a` ⇒ I can see the data entered in step 4.

If you try to follow the above steps, are you also getting the same result?

properties-local.xml
<http://discuss.orbeon.com/file/t119778/properties-local.xml

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1582221502803-0.post%40n4.nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAKt4_v3KNzCJkLqXh7N5StGmkORuojBVp8b6QLm876JheXt%2B3Q%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Alessandro  Vernet
Administrator
Hi Timo,

Ah, yes, indeed, flat views won't work if you're not using the default data
format in your database. We should remove that restriction, and I looked
into it, but unfortunately the change isn't trivial. So, for now I've
created issue #4440, and made this clear in limitation section of the Flat
view documentation.

https://github.com/orbeon/orbeon-forms/issues/4440
https://doc.orbeon.com/form-runner/persistence/flat-view

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1582322066907-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Timo Nisula
Hi Alex,

Thank you. So use default data format for time being :)

-Timo

On Fri, Feb 21, 2020 at 11:54 PM Alessandro Vernet <[hidden email]> wrote:
Hi Timo,

Ah, yes, indeed, flat views won't work if you're not using the default data
format in your database. We should remove that restriction, and I looked
into it, but unfortunately the change isn't trivial. So, for now I've
created issue #4440, and made this clear in limitation section of the Flat
view documentation.

https://github.com/orbeon/orbeon-forms/issues/4440
https://doc.orbeon.com/form-runner/persistence/flat-view

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1582322066907-0.post%40n4.nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/CAKt4_v3iwFvHbkSSkJLAxFx6qUSDYxEAwoLrvxv_DfNofu6wsg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: PostgreSQL Flat view

Alessandro  Vernet
Administrator
Ok Timo, and I'm at least glad you're able to change the data format at the
database level.

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/orbeon/1582657400265-0.post%40n4.nabble.com.
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet