Hi,
I’m trying to make an application where you can see the production data of a company. I generated the entities I needed from an oracle database and for one of the two entities the framework generated me a Compkey class with two attributes. Also, the entities have no association with each other. Now I want to create a screen where you can view the data of two separate entities. I thought about creating a screen from one of the two entities and doing an inner join with the other but it gives me an error.
Also, I tried to use this model (two-entities-one-table.zip )(90.9 KB) as an example, but here too it gives me an error.
How can I solve the problem ?
An example of a query that I tried to insert:
select p.codice_prodotto, p.descrizione, r.id.id_linea
from table1 p inner join table2 r
on p.codice_prodotto = r.id.cod_prodotto
Hi!
Unfotrunatelly I failed to install attached model because of ‘Unsupported CUBA Version’ error
Could you please attach a small sample project along with reproduction scenario that demonstrates the issue?
Hi,
it’s a bit complicated to demo the project I’m making. I try to explain it to you.
What I want to do is generate a screen that shows a table made up of product code, idLinea, product description. I created a composition @OnetoMany in the Lines entity and @ManyToOne in the Products entity. Also, the Lines entity has two primary keys Product_Code and Line ID.
Hi,
We will be able to suggest a solution if you make a small test project with your data model.
Please use simple names for entities, HSQL or PostgreSQL database and the latest CUBA 6.10 or 7.2.
I have two entities, Persons and Representatives, which in the database are related 1 to N through a foreign key.
Person
IdPerson(PK)
Name
Surnames
Address
Representative
IdPerson(PK)
IdRepresentative(PK)
Name
Surnames
When Cuba Platform reads the tables and creates the entities, it generates the two entities plus the composite key class for Representatives.
Person
idPersona(PK)
name
surnames
address
Representative
id(CompKey idPerson+idRepresentative, not linkable)
name
surnames
address
RepresentativeCompKey
idPerson
idRepresentative
I don’t know how to create the 1 to N relationship between Person and Representative since it is not possible to make the relationship directly.
And if I create the relationship using the CompKey when I run the application, it gives the error: