cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

HSQL One-To-Many relationship

0 Likes
786

Hi All,

Can you let me know where does Hybris store the relationship btw Vendor and Warehouse

VendorWarehouseRelation?

Thanks,

Bruce

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Son,

In Hybris, the link table (for storing the relations) will be created only for many to many relations.
While, for other type of relations i.e. one-many / many-one, there is no requirement of extra link table.

The VendorWarehouseRelation relation is an one-many type, so here , in Warehouse table, we will have the Vendor's PK as a foreign key which is associated for each row of a Warehouse.

Answers (1)

Answers (1)

0 Likes

Thanks ,

So it means that, Hybris will create a column in Warehouse table to keep Vendor's PK.

I just wonder about the case when ordered="true", will Hybris create another column to keep the ordering?

Does Hybris create VENDORPOS column?

Thanks

Former Member
0 Likes

Hi Son,

The ordered attribute makes your relation items sorted, that means whens you fetch these items through query it will be in a sorted order.

0 Likes

Thanks - if ordered=true then how Hybris know which field need to order by xxx on many side?

andyfletcher
Active Contributor
0 Likes

Yes, it's the p_[source element qualifer]POS column

e.g. in your case p_vendorpos but for say AvailableSlotsForTemplate it's the p_templatepos column on the ContentSlotName table.

0 Likes

Thanks

Ask a Question