RafficMaleo / android-active-record

Automatically exported from code.google.com/p/android-active-record
0 stars 0 forks source link

Fields with similarly named fields that end with numbers lead to duplicate columns #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new entity that has some elements in it like phoneNumber1 and 
phoneNumber2 
2. Add this class to the DatabaseBuilder
3. Try to create your database.  An exception will get throw

What is the expected output? What do you see instead?
You will get an error similar to the following:
E/Database( 2068): Failure 1 (duplicate column name: OPTION) on 0x11d668 when 
preparing 'CREATE TABLE PRODUCT_VARIANT (_id integer primary key, UPDATED_AT 
int, CREATED_AT int, FULFILLMENT_SERVICE text, TITLE text, SKU text, 
INVENTORY_MANAGEMENT text, INVENTORY_POLICY text, OWNER int, OPTION text, 
OPTION text, OPTION text, INVENTORY_QUANTITY int, POSITION int, PRICE real, 
PRODUCT_ID int, REQUIRES_SHIPPING bool, ID int, TAXABLE bool, GRAMS int, 
COMPARE_AT_PRICE real)'.

What version of the product are you using? On what operating system?
Android 2.1-update1
AAR - trunk

Please provide any additional information below.
Attached is a patch which fixes the issue along with tests to replicate the 
issue and prove that the problem has been resolved.

Original issue reported on code.google.com by c.saunde...@gmail.com on 24 Jan 2011 at 9:51

Attachments: