Hi,
in general I read from this, that you want to use the Autonumber as Key-attribute to match your product list and the shopping cart?
In general, you don’t need key attributes to do this. You can simply create an association
ShoppingCart 1<-----* Product List
and save these relationship everytime you add a product to your shopping cart. Mendix itself will take care in the background, that the key-attributes are being generated. You don’t need to take care about this. :-)