pinchbv / floor

The typesafe, reactive, and lightweight SQLite abstraction for your Flutter applications
https://pinchbv.github.io/floor/
Apache License 2.0
947 stars 190 forks source link

Primary id does not work #832

Closed Zokirjon-Ashiraliyev closed 3 months ago

Zokirjon-Ashiraliyev commented 3 months ago

I have a entity, which include product id, price type, as well as id etc. Id is created by autogeration, but product id and price type are different but, you can see them again more time next elemen of list. For insatnce final productPrices = [ ProductPriceEntity(id: null, priceTypeId: "1", productId: "A", price: 10.0), ProductPriceEntity(id: null, priceTypeId: "1", productId: "A", price: 12.0), ProductPriceEntity(id: null, priceTypeId: "2", productId: "A", price: 15.0), ProductPriceEntity(id: null, priceTypeId: "2", productId: "B", price: 20.0), ]; I can only see one time in floor databse by app inspection in android studion. For example : final productPrices = [ ProductPriceEntity(id: null, priceTypeId: "1", productId: "A", price: 10.0), ProductPriceEntity(id: null, priceTypeId: "2", productId: "A", price: 15.0), ]; How can i insert all elements to table . Can you help me?