Referencing another SQLContainer; how to use?


I’m trying to use this feature. Reading paragraph 9.6 from the Vaadin book, didn’t make things more clear, sorry!

Consider two tables SOURCE and TARGET. SOURCE has a foreign key named TARGET_FK while TARGET has its primary key called TARGET_ID. TARGET_FK in TARGET is refering to TARGET_ID in TARGET.

Two SQLContainers SourceC and TargetC contain the contents of the tables SOURCE and TARGET respectively.

Now SOURCE.addReference(TargetC,“TARGET_FK”,“TARGET_ID”) gives a reference!

After this I don’ t understand the clue of this feature! Can someone elucidate on the possibilities and use of this feature, please?