chenfy1985 / sqlitegen Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sqlitegen
Automatically exported from code.google.com/p/sqlitegen
What steps will reproduce the problem?
1. Create a project that uses Android's CursorAdapter and generate an ORM with
SQLiteGen.
SQLiteGen has the rowid column as _ID.
2. Query the database and attach the cursor to the Cursor adapter.
3. Crash
What is the expected output? What do you see instead?
It should work, but does not because, CursorAdapter expects to find an _id
field, not _ID. This is
standard through most of the Android APIs regarding _id.
http://developer.android.com/reference/android/widget/CursorAdapter.html
"Adapter that exposes data from a Cursor to a ListView widget. The Cursor must
include a
column named "_id" or this class will not work."
I have worked around this by modifying the source for the plugin. Patch for fix
is attached. (You'll
want to revert the manifest and properties files)
Original issue reported on code.google.com by [email protected]
on 23 Aug 2009 at 6:14
Attachments:
What steps will reproduce the problem?
1. create a method int getId() with annotation
FieldAccessor(Type=FieldType.INTEGER_PRIMARY_KEY)
What is the expected output? What do you see instead?
The SQL query have INTEGER ID PRIMARY KEY AUTOINCREMENT
The SQL query says INTEGER ID, so it seems to ignore the Type annotation
What version of the product are you using? On what operating system?
sqlitegen: db_0.1.5.jar with sqlitegen_eclipse_site_0.1.16.jar
eclipse Version: 3.6.0
OS: ubuntu 10.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2010 at 12:11
I can not generate the java files. I copied the Examples code to a Android
project. Enabled SQLiteGen annonation processing, but no gnereated file found.
My Eclipse Version: Helios Service Release 2, Build id: 20110301-1815.
Original issue reported on code.google.com by [email protected]
on 6 Sep 2011 at 6:53
It would be awesome if this would do the following things:
1) Generate a DB Helper which would (with some help somehow, very hand-wavey)
generate a SQLiteOpenHelper that will create the database migration (for
onUpdate) ala Rails migrations.
2) Generate one class which will encapsulate loading/saving an object or
collection of objects. Add a simple BeanHelper interface which will provide
the populate/getvalues in a common name, and then treat all objects like this.
In this way, the common database upgrades are already handled by generated
code, creation is generated from the available object types, and I can save an
object by calling one function (akin to Hibernate's .save)
Original issue reported on code.google.com by [email protected]
on 21 Jul 2010 at 1:29
What steps will reproduce the problem?
1. Put interfaces with sqlitegen annotations into subpackage of root package.
What is the expected output? What do you see instead?
Correspondent classes are to appear in gen folder (or same package hierarchy is
to be created in gen folder). No files are generated at all instead.
What version of the product are you using? On what operating system?
0.1.18 plugin, 0.1.6 library
Original issue reported on code.google.com by [email protected]
on 3 Aug 2011 at 8:01
What steps will reproduce the problem?
1. define an attribute each of Temestamp/Date/Bitmap type in the Interface
(all are Nullable). E.g, Timestamp getPrescriptionDate();
2. The Gen_getValues() method in the generated class has the following
line:
values.put(GEN_FIELD_PRESCRIPTIONDATE,this.gen_prescriptionDate.toString());
3. When updating an instance of a class to database using
myObj.Gen_update(DB), the above line throws a null pointer exception as
this attribute is nullable.
What is the expected output? What do you see instead?
Handling of the nullable attributes especially non int/string/long types.
What version of the product are you using? On what operating system?
Latest
Please provide any additional information below.
I might be missing a trick is utilizing the SQLitegen. If so please guide
me in the right direction and disregard the reported issue.
Original issue reported on code.google.com by [email protected]
on 14 Apr 2010 at 2:08
I tried you example on my own android project in eclipse (in a separate java
file).
I got:
com.antlersoft.android.dbgen.SourceInterface$SIException: Failed to create
class AbstractConnectionBean
at com.antlersoft.sqlitegen.PluginSourceInterface$PluginSourceWriter.done(Unknown Source)
at com.antlersoft.sqlitegen.PluginSourceInterface.doneWithWriter(Unknown Source)
at com.antlersoft.android.dbgen.SourceFileGenerator.generate(Unknown Source)
at com.antlersoft.sqlitegen.SQLiteGenBuilder.checkSQLiteAnnotations(Unknown Source)
at com.antlersoft.sqlitegen.SQLiteGenBuilder$DeltaVisitor.visit(Unknown Source)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:68)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
at com.antlersoft.sqlitegen.SQLiteGenBuilder.incrementalBuild(Unknown Source)
at com.antlersoft.sqlitegen.SQLiteGenBuilder.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: Java Model Exception: Core Exception [code 368] Resource
'/KliquePhone/gen/com/klique/db' does not exist.
at org.eclipse.jdt.internal.core.JavaModelOperation.createFile(JavaModelOperation.java:276)
at org.eclipse.jdt.internal.core.CreateCompilationUnitOperation.executeOperation(CreateCompilationUnitOperation.java:118)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.PackageFragment.createCompilationUnit(PackageFragment.java:145)
... 26 more
Any ideas?
Original issue reported on code.google.com by [email protected]
on 26 Jan 2011 at 2:40
It would be a really good feature to make it possible to generate classes based
on already existent "create" script.
For example if parser finds GEN_CREATE constant in interface with
TableInterface annotation it will try to parse the script which the constant
contains.
Original issue reported on code.google.com by [email protected]
on 3 Aug 2011 at 7:47
It would really help newbies to your project if there was a tutorial explaining
how to tie this into an example project. From reading other tutorials on SQLite
I *think* I get what I need to do to utilize your beans, but I'm guessing and
just starting with both your project and SQLite.
Thanks,
Scott
Ps. If you would give me the high level description of what's missing I'm happy
to write up a step by step tutorial for the Wiki.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2011 at 12:18
What steps will reproduce the problem?
1. create a package myapp.db
2. create a class with sqlitegen annotations
3. After sqlitegen generates a bunch of abstract classes, run project->clean on
eclipse
What is the expected output? What do you see instead?
database classes are no longer generated after the auto generated classes were
deleted by project clean
The SQL query says INTEGER ID, so it seems to ignore the Type annotation
What version of the product are you using? On what operating system?
sqlitegen: db_0.1.5.jar with sqlitegen_eclipse_site_0.1.16.jar
eclipse Version: 3.6.0
OS: ubuntu 10.04
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2010 at 12:22
What steps will reproduce the problem?
1. provide DefaultValue annotations for int or long fields
2.
3.
What is the expected output? What do you see instead?
Expectation is that generated file has 'DEFAULT n' qualifier on row for
creation. Result is somewhat unpredictable. Sometimes the row definition itself
is missing, sometimes it is just missing the DEFAULT clause. DefaultValue seems
to work fine for strings and booleans.
What version of the product are you using? On what operating system?
1.18 plugin
0.1.7 android library
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 14 Jun 2012 at 11:02
You should add c.close() before both returns.
Original issue reported on code.google.com by [email protected]
on 30 Jun 2010 at 10:39
What steps will reproduce the problem?
1. Configed plug-in in eclipse, restart and have the checkbox checked
2. Add libs in project ref
3. Add interface of your sample into porj with correct package name
What is the expected output? What do you see instead?
But no java generated.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 18 May 2011 at 7:01
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.