shuiyouren / sqlitepersistentobjects

Automatically exported from code.google.com/p/sqlitepersistentobjects
0 stars 0 forks source link

Properties/Columns With First Letter Capitalized Breaks Reading Process [possible fix included] #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a persistent object with a property/column that has the first letter 
capitalized, i.e. 
"XMLName" and at least one column after it.
2. Write a record to the database.
3. Try to read the records with findByCriteria:@"" and the column after 
"XMLName" won't be read.

This seems to fix the issue:
NSString-SQLiteColumnName.m, Line 32, delete "&& i > 0" from the if statement.  
I think this just 
prepends a _ when the first letter is capitalized.

It seems to be working with this fix, but I'm not sure if there was a reason 
that the "&& i > 0" was 
added in the first place.

Original issue reported on code.google.com by davidjc...@gmail.com on 7 Sep 2008 at 10:58

GoogleCodeExporter commented 8 years ago
Hmm... the reason for the i>0 is that we don't want column names that begin 
with an underscore. I'll have to 
look at this issue in more detail.. thanks for reporting it.

Original comment by jeff.lam...@gmail.com on 21 Oct 2008 at 4:29

GoogleCodeExporter commented 8 years ago
Issue 32 has been merged into this issue.

Original comment by amle...@gmail.com on 23 Feb 2009 at 11:51