Relacionamento Muitos-para-muitos


Author
Message
Malcon M. Mikami
Malcon M. Mikami
StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)
Group: Forum Members
Posts: 60, Visits: 1.3K
Bom dia, fiz uma aplicaçao de teste para ver o relacionamento multiplo.

Possuo 3 tabelas  Fornecedor, FornecedorProduto, Produto.

Quando faço o relacionamento 1..*(Match) entre FornecedorProduto - Produto ele retorna a linha selecionada.

Quando faço *..* (Cascate) entre FornecedorProduto - Produto ele nao retorna nada. Oque pode ser?

Nas imagens, o sistema com o relacionamentos e os resultados.

Attachments
match.JPG (128 views, 215.00 KB)
cascate.JPG (126 views, 225.00 KB)
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Difícil descobrir assim, Malcon, sem ter um exemplo na mão.

Mas olhandos suas imagens, a única coisa que dá para notar é que em uma você está parado na linha de GPP_PKID = 5, e então o GPP_GPS_PKCODIGO = 454, enquanto que na outra você está no GPP_PKID = 4, e o GPP_GPS_PKCODIGO = 123, o qual pode ser que não tenha nenhum relacionamento na sua tabela GPS.

Malcon M. Mikami
Malcon M. Mikami
StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)
Group: Forum Members
Posts: 60, Visits: 1.3K
Ivan, em anexo o projeto e os scripts de criacao de tabelas.
Attachments
Strata.zip (120 views, 969.00 KB)
scripts.zip (124 views, 4.00 KB)
Malcon M. Mikami
Malcon M. Mikami
StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)
Group: Forum Members
Posts: 60, Visits: 1.3K
Ivan. Me corrija se eu estiver errado.

Nas imagens tenho 3 grids. O superior o Pessoa, O do meu PessoaProduto e o inferior Produto.

Se faço um ChildAutoFilterOption = MatchCurrentRow no Bo do grid do meio, que possuie 2 registro, o grid inferior(filho do pessoaproduto) nao deveria tbm aparecer 2 registros?

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)Strategic Support Team Member (3.5K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Não, deveria aparecer somente o Produto relacionado ao seu PessoaProduto.
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)StrataFrame VIP (1.6K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Ivan,

Do you know of a Portugese to English translator, perhaps a website? I read most of the posts on the forums just to have them in the back of my mind when I run into an issue or task. I wish I could read some of your answers

Keith Chisarik

Dustin Taylor
Dustin Taylor
StrataFrame Team Member (660 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
translate.google.com is what we usually resort to when Ivan isn't around (which, thank the lord, isn't all that often BigGrin)
Malcon M. Mikami
Malcon M. Mikami
StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)
Group: Forum Members
Posts: 60, Visits: 1.3K
Sorry friends, but my English is weak. In the coming posts I put the translation into English.
 
Ivan, agora não entendi nada. Qual a diferença entre CascadeRowFilter e MatchCurrentRow, você poderia me falar um exemplo prático?

 
Ivan, now do not understand anything. What is the difference between CascadeRowFilter and MatchCurrentRow, you could tell me a practical example?

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The MatchCurrent row will only filter out records on the child BO that match the parent relationship.  For example,

Parent BO

PrimaryKeyName
1ABC Vending
2XYZ Autos
3Zenith Auto Sales

Child BO

PrimaryKeyParentForeignKeyOrderTotal
11$15.00
21$20.00
32$40.00
43$10.00

So using the tables above, if the ParentBO is using MatchCurrentRow, and the CurrentRowIndex is on the PK record of "1", then the ChildBO would filter out all records except the records with a PK of 1 and 2 above.

When using CascadeRowFilter, all of the children records that match the visible parent records will be fitlered.  So let's assume that I put a filter like this on my parentBO:

MyParentBO.Filter = "PrimaryKey = 1 OR PrimaryKey = 3"

In this example, the following child records would be visible:

 

PrimaryKeyParentForeignKeyOrderTotal
11$15.00
21$20.00
43$10.00

Malcon M. Mikami
Malcon M. Mikami
StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)StrataFrame Novice (104 reputation)
Group: Forum Members
Posts: 60, Visits: 1.3K
Hi Trent, thanks for the prompt reply.
I have the following situation:
 
Person (PrimaryBO)
PrimaryKey  Name
1         Malcon
2         Trent
3         Ivan
 
 
PersonProduct(RelationBO)
PersonForeingKey     ProductForengKey
1                           1
1                           2
2                           1
2                           3
2                           4
3                           1
 
 
Product(ChildBO)
PrimaryKey    Details
1                Hard-Disk
2                CPU
3                LCD
4                Case
 
 
When I select a line of Person, it will filter every record in PersonProduct, I would like to automatically filter out all visible record in Products based on PersonProduts
 
My relationship this way:
Person ---(MatchCurrentRow)----PersonProduct ----(CascadeRowFilter)----Product
 
In short, when I filter a Person would like to see all the details of the products this person.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search