Osmosis - extract part from the planet.osm

Hello everyone,

I tried to extract a part of the planet.osm database using osmosis by this way :
osmosis --read-xml enableDateParsing=no file=D:/planet-100721.osm --bounding-box top=43.7 left=1.3 bottom=43.5 right=1.6 --write-xml file=C:/toulouse.osm

And after, I tried to import it, still with osmosis, like this :
osmosis --read-xml file=“C:/toulouse.osm” --write-apidb host=“localhost” database=“osm” user=“osm” password=“osm”

But during the import, I had a foreign key exception because their was a way which used a node that didn’t exists in the database.

Is it normal or I missed something ?

Thank you very much,

Aurélien