Comments (3)
Welcome @RichardForsey89 . I don't quite understand what you are saying. Are you saying that the SQL generated doesn't add in some SQLite specific Foreign Key
tag? ORMLite's SQL generation certainly does have some holes. Can you create your schema by hand (yes a pain) and then use ORMLite just for the entities?
In the future, be careful of statements like "doesn't work" and be more specific. Thanks.
from ormlite-jdbc.
Thank you for the quick reply Gray. The generated schema would be missing the Foreign Key constraint, which would then cause issues with INSERTs to Profiles where a child Workspace would be generated, but the child workspace wouldn't have the profile_id
filled in, but the Profile entity would have a field of workspace_id
filled with the child's. So at first glace it would seem that using ORMlite for the entities would be troublesome for my situation.
I admit that I could be incorrect with my expectations/application of ORMlite. Am I to understand that the Foreign Key
constraint is only enforced at the software layer, rather than in the schema?
Also, I'll be more careful of my language in future.
from ormlite-jdbc.
Supporting perfect schema generation on all of the supported database types is hard. Right now its doesn't setup foreign key constraints unfortunately. I would recommend adding them afterwards by hand. You can use the Dao.executeRaw(...)
method for this.
from ormlite-jdbc.
Related Issues (20)
- Column Sizes Shrinking HOT 5
- Succeed use for SQLite in Windows, but failed in Mac. HOT 3
- Compatibility with Java 9. HOT 7
- UnsatisfiedLinkError: couldn't find "libsqlitejdbc.so" HOT 4
- SQLCipher in Ormlite SQLITE DB JDBC
- The ODBC database type should be deprecated/removed
- How to connect two entities in different tables HOT 6
- `DATABASE_URL == null` should throw an exception HOT 1
- Asynchronous JDBC HOT 5
- Duplicate package names in core and jdbc jars HOT 1
- Update not null columns HOT 4
- broken links in ยง7 (example code) of documentation HOT 1
- NullPointerException when use JdbcSingleConnectionSource HOT 1
- [MariaDbDatabaseType] isCreateIndexIfNotExistsSupported returns false although the feature is supported
- Problems to detect existing tables with mariadb-java-client 3.x.y
- Support for SQL query index hints. HOT 1
- Statement getGeneratedKeys HOT 6
- `generatedId` field not supported since Xerial SQLite driver 3.43.0.0 HOT 1
- Security vulnerability - SQL injection #147
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ormlite-jdbc.