Negative IDs in planet_osm_polygon

Hello, after I imported the osm data with osm2pgsql in my PostgreSQL database, I noticed some negative oms_ids in the table ‘planet_osm_polygon’.
My Problem is now that I need to make a link to the table ‘planet_osm_ways’ where the corresponding entry doesn’t have the same ID anymore.
So how do I get the link between these two tables?

positive ID: planet_osm_polygon.osm_id = 2452897
planet_osm_ways.id = 2452897

negative ID: planet_osm_polygon.osm_id = -2812465
planet_osm_ways.id = 4599230

Thanks for any help.

IMHO osm2pgsql will not “invent” new ids, it -will- however create extra entries for polygons that are members of relations with the neg. id of the relation see http://wiki.openstreetmap.org/wiki/Osm2pgsql/schema