Giter Club home page Giter Club logo

sqlitegen's People

Contributors

antlersoft avatar

Watchers

James Cloos avatar

sqlitegen's Issues

SQLiteGen creates an _ID column instead of _id, which prevents usage with various Android SDK features (like CursorAdapter)

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:

Type=FieldType.INTEGER_PRIMARY_KEY doesn't work

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

Cannot work

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

Database versioning and DBHelper generation

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

Package hierarchy is not supported

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

Timestamp / Date / Bitmap type attributes.

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

Code generation fails on you example

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

Need Tutorial

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

sqlitegen stops working after project clean

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

DefaultValue annotation failing for ints and longs

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

Failed to generate java

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.