Hey Belyaev ,
i need to join two tables and display columns from both the tables which have same key into a single UI Screen , can you help me with this ?
Hey Belyaev ,
I’m not sure what is the relation between two tables, but the simplest way - you can create a CUBA view and fetch data you need. For example you have tables “Master” referencing to “Details” as one-to-many. With a CUBA view you can select “Details” and join “Master” record. Assume that you have “master” property for each detail. In this case you will be able to reference to “master” entity properties like “master.name” in table column editor. Hope it helps.
hello andrey ,
i have one master table and one details table lets say the master as one and the details as two
i have created a new attribute with many to one relationship and type assosiation in the master table and then created a view for it which displays colums from the second table in the browser but while running it shows init ui error or attribute does not exist
can you pls attach a sample project which joins two tables from one database?
Please find a simple example attached. Hope this is what you want to achieve. It uses the latest version of CUBA framework (7.x), but the idea is the same for CUBA 6.x
master-detail-sample.zip (83.5 KB)
Did it help?
yeah andrey thank you .