Request

47 views
Skip to first unread message

Angelo

unread,
Jun 18, 2020, 2:08:15 AM6/18/20
to manydesigns-portofino
Hi,
copy/paste a request that arrived by email from a user who cannot use gmail acccount.


Dear Portofino-Team,

 

I am currently tasked to evaluate Portofino and I ran into some problems.

The setup contains an installation of Portofino 5, a MySQL Database with one Schema called “PORTOFINO” and one table named “mapping”, which simply contains a ID and a Name-Column for testing purposes.

 

I tried setting up a basic CRUD Page, but I am unable to read data from the database. I would like to ask you if you can help me to connect to the database.

 

Here is the set up process in detail:

The DDL for the mapping-table looks like this:

 

CREATE TABLE `PORTOFINO`.`mapping` (

    `NAME` VARCHAR(128) NOT NULL,

    `ID` INT NOT NULL

)  ENGINE=INNODB DEFAULT CHARSET=UTF8;

 

(Info: MySQL Workbench warns me:

…1 warning(s): 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous… )

 

I have added two rows of data like this: (Note: I tried this with and without ID as a primary key, as somebody mentioned using primary keys in an older thread)

 

INSERT INTO `PORTOFINO`.`mapping` (`NAME`, `ID`) VALUES ('Test1',1), ('Test2',2);

 

So far, I am able to connect to the MySQL DB using Portofino and using the Wizard Portofino provides. I am entering the necessary values like the Connection URL, Username and Password.

After that, I select the Schema PORTOFINO.

After that, I do not set up any User groups since I just want to do some basic testing.

Finally, I can choose the table to import (in my case: “mapping”).

 

I get logged out because the pages get created. Now I can set up the CRUD Page for mapping.

As HQL, Portofino already selected “from mapping order by id desc “ – looks similar to the one you provided in the manual. (The table name is in lower case – which is needed according to another thread)

The correct Database (the connection I did set up before as described above) is used.

Under properties, I am able to see the two columns “name” and “id”. I checked every Box to be able to completely modify the table.

I only changed the Permissions for Admins (The Access  Level ist DEVELOP) to Create, Edit and Delete. I did not change anything in the “Children” tab.

 

If I save the page and have a look at it, I can see that the CRUD page has been created as expected.

However, I cannot see any of the entries I have inserted. In the bottom right corner it says “0 of 0”. (I will add a screenshot of the CRUD page and the setup for the CRUD page at the bottom of this post.)

I have tried to do the setup process multiple times. I have reloaded the model and synchronized the schema multiple times.
But I can´t figure out where the error is.

 

Some research revealed that Portofino is very sensitive when it comes to the data tables and their formatting.

The first table was created with statements like this: … `ID` varchar(50) CHARACTER SET latin1 DEFAULT NULL, …

The result was that my table was not selectable when setting up the connection. There was no table listed under “Wizard” > “Create the application” > “Select them manually” when using the wizard!

It worked after recreating the table in the database with statements like this: … `ID` varchar(128) NOT NULL, …
This information might be helpful when solving this issue. Are there any known format requirements to the data in the MySQL Database?

Does Portofino inherit the Data type from the source table or do we need to manually change them when executing an CRUD?

 

Can you help me with finding a solution?

 

Best regards

Yannik

attach2.png
attach1.png

Giampiero Granatella

unread,
Jun 19, 2020, 8:21:49 AM6/19/20
to manydesigns-portofino
Hi Yannik, 
Portofino uses Hibernate and needs a primary key in the tables to be correctly managed by the crud. Do you have a pk in your table?

Bye
Giampiero

--
You received this message because you are subscribed to the Google Groups "manydesigns-portofino" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manydesigns-port...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/manydesigns-portofino/5cbcb8c7-d3da-4a97-9ba9-9ed89a82c38eo%40googlegroups.com.

Alessio Stalla

unread,
Jun 19, 2020, 9:31:20 AM6/19/20
to manydesign...@googlegroups.com
On Fri, 19 Jun 2020 at 14:21, Giampiero Granatella <grana...@gmail.com> wrote:
Hi Yannik, 
Portofino uses Hibernate and needs a primary key in the tables to be correctly managed by the crud. Do you have a pk in your table?

Other than that, there are no requirements on the tables if they have columns of standard types like in your case. In fact, I was able to get your example to run and display the data.
Perhaps you could look at the logs to see if there are any exceptions and post said logs here.
 
Reply all
Reply to author
Forward
0 new messages