Hi Varsh,
As far as I know,
The "Error when empty" option in Mendix’s Export Mapping is meant to stop the export if a specific part of the data is missing. But in your case, Library3 is still getting exported even though it has no Books or Members. Here’s why:
Even though the Books and Members associations are empty, the Library itself isn’t. Mendix sees that there’s still a Library object with a Name and Location, so it exports it anyway. The "Error when empty" setting applies only to specific fields (like Books and Members), not to the whole Library entity.
Hope it helps!!