cef62 / dao-ext Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/dao-ext
Automatically exported from code.google.com/p/dao-ext
What steps will reproduce the problem?
1. generate DAO access classes
What is the expected output? What do you see instead?
The createTable method is corrupt (incomplete). The result is similar to
the following
stmt.text = "CREATE TABLE IF NOT EXISTS my_table (
id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
some_id integer NOT NULL,
/* Foreign keys */
FOREIGN KEY (some_id)
REFERENCES t_someTable(id)
);"
public function getTableContent( [...]
What version of the product are you using? On what operating system?
Dao-Ext 0.1
Please provide any additional information below.
The SQL string for the creation of the table is wrapped across lines but
contains no " " + " " + .
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 8:12
the subject says it all
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 6:03
I've quicky tested the functionality and everything seems work.
HUGE timesaver.
However the design of the tool is completely what you would expect from
able programmers. not to good.
maybe for now the default flex skin is a better alternative?
at BUT (www.but.be) we have a similar approach for having DAO and VO.
but the implementation of singleton and the event handling is somewhat
different. We might in the distant future create a similar tool for this
repetitive task. best of luck, and thank you for open sourcing it!
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 7:52
For the table:
CREATE TABLE IF NOT EXISTS ALUNO (
NR_ALUNO INTEGER NOT NULL,
TURMA_ID INTEGER NOT NULL,
...
PRIMARY KEY(NR_ALUNO,TURMA_ID)
);
The generated deleteRow is:
public function deleteRow( rowItem:ALUNOVO, resultHandler:Function = null,
faultHandler:Function = null ):void {
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = 'DELETE FROM ALUNO WHERE TURMA_ID = primaryKey.TURMA_ID;';
stmt.addEventListener( SQLEvent.RESULT,
function ( event:SQLEvent ):void {
if (resultHandler != null) resultHandler.call(this, rowItem);
});
stmt.addEventListener( SQLErrorEvent.ERROR, faultHandler == null ?
sqlErrorHandler : faultHandler );
stmt.execute();
}
Which is incorrect!
Original issue reported on code.google.com by [email protected]
on 11 Mar 2009 at 6:32
Named parameters are easier to edit, change, or omit than ? params.
stmt.text = 'INSERT INTO scores( contestant, score, correct, incorrect ) '+
'VALUES (@contestant,@score,@correct,@incorrect );';
stmt.parameters['@contestant'] = rowItem.contestant;
stmt.parameters['@score'] = rowItem.score;
stmt.parameters['@correct'] = rowItem.correct;
stmt.parameters['@incorrect'] = rowItem.incorrect;
The looping function setParams seems to hate it if any of the ?'s are changed
around. The code
should scaffold up to allow for this level of flexibility. Not all params need
to be sent on an insert.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2009 at 5:22
What steps will reproduce the problem?
1. create a table with a field named "key"
2. SQLite will save it with quote marks ("") around it because it's a
reserved word
What is the expected output? What do you see instead?
the createTable method contains the SQL string in the same type of quote
marks just as the field name.
What version of the product are you using? On what operating system?
Dao-Ext 0.1
Please provide any additional information below.
replace double-quote marks with single around the SQL string or aroung the
field name.
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 8:17
What steps will reproduce the problem?
1. generate VOs
It outputs this, thus generating a Warning in Flex Builder about the return
type
private var _field:Object;
public function get field():Object {
return _field;
}
public function set field( value:Object ) {
_field = value;
}
you could add "void" by default ;)
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 6:01
Would love to see some example code on best practices for implementation of
this design pattern
and how you use in it some basic examples. A popular one for most frameworks or
libraries seems
to be a basic blog (see rails or cakephp screencasts). This would help those of
us unfamiliar with
the DAO and VO approach to see how to get started with this sweet new tool
quickly without
trudging through trial and error or unrelated java docs.
Original issue reported on code.google.com by [email protected]
on 16 Mar 2009 at 3:30
Hi there, the dao-ext is not generating the DAO's, not even with the sample
db you provided
Original issue reported on code.google.com by [email protected]
on 11 Mar 2009 at 4:25
the AIR api supports automatic type casting by indicating the field
.itemClass in the SQLStatement instance.
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 6:03
Great work, I'm recommending it on my blog.
I think the interface is Ok, the visual here is not the most important
aspect, but I fell the lack of some "Visibility of system status" as
prescribed by Nielsen, indicating that it's creating the files and after it
has finished and this issue is less dramatic than a whole new interface.
As an beginner in OO development I'd rather to insert here more as a doubt
than a issue, when our tables have Foreign Keys fields wouldn't they have
to be mapped in the VOs as objects from the related classes by composition ??
thanks
jcarlos
Original issue reported on code.google.com by [email protected]
on 17 Oct 2009 at 6:40
What steps will reproduce the problem?
1. create db
2. generate code
3. run code
What is the expected output? What do you see instead?
not having having trailing commas where they dont belong. commas appear between
sets and
values and after lists of columns
ex:
insert (bla), VALUES (?)
--------^
insert (bla1, bla2,), VALUES (?,?,)
-------------^
update bla set bla1, bla2, where bla1=?
-------------------^
Original issue reported on code.google.com by [email protected]
on 17 Mar 2009 at 3:30
What steps will reproduce the problem?
1. Choose database file
2. Choose destination
3. Generate Daos
What is the expected output? What do you see instead?
In Update generator, WHERE stmt I expected primary keys. I got WHERE ID=?
What version of the product are you using? On what operating system?
0.2.2 OSX (10.8.4)
function suggested:
private function updateDAO( tableName:String, parameters:ArrayCollection,
primaryKeys:Array,voClass:String="Object" ):String
Original issue reported on code.google.com by [email protected]
on 14 Jun 2013 at 10:46
Attachments:
Data types can be the following:
FLOAT -> Number
INTEGER -> int
TEXT, VARCHAR -> String
instead of the generic Object data type
Original issue reported on code.google.com by [email protected]
on 2 Mar 2009 at 6:02
What steps will reproduce the problem?
1. Connect to db
2. Pass connection to DAO using setConnection
What is the expected output? What do you see instead?
A connection. An error
Please provide any additional information below.
The setConnection sets the database connection after it tries to run the
createTable which doesn't
seem to make any sense. I removed this from my code since I copy the db to the
local store and
dont need create table statements.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2009 at 3:33
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.