persistence

Play Framework: PersistenceException: The type is not a registered entity? (Ebean)

坚强是说给别人听的谎言 提交于 2019-11-30 05:25:47
I'm following the Play Framework 2.0 tutorial for Java and get this error when trying to save an ebean Model ( task.save() ). [PersistenceException: The type [class models.Task] is not a registered entity? If you don't explicitly list the entity classes to use Ebean will search for them in the classpath. If the entity is in a Jar check the ebean.search.jars property in ebean.properties file or check ServerConfig.addJar().] Check these 3 points : Your model is annotated with @Entity (javax.persistence.Entity) Your model extends Model (play.db.ebean.Model) Ebean is enable in your application

YAML serialization library for C++?

谁说胖子不能爱 提交于 2019-11-30 05:15:55
YAML seems like a great format for configuration files & data binding persistent objects in human-readable form... Is there a C++ library that handles YAML? Does Boost::Serialization have plans for a YAML option? EDIT: I would prefer an OO library. A quick search gave me this: yaml-cpp Try the YAML component from the BOOST vault serialization library . EDIT 2014 : A recent development, https://groups.google.com/d/msg/boost-devel-archive/mhT7qIh1nsI/uXAuXFAWrxQJ EDIT 2019 : Didn't try it yet, but this seems to be a serious take: https://github.com/rwols/yaml-archive I found this, please if you

Shelve is too slow for large dictionaries, what can I do to improve performance?

只谈情不闲聊 提交于 2019-11-30 04:59:50
I am storing a table using python and I need persistence. Essentially I am storing the table as a dictionary string to numbers. And the whole is stored with shelve self.DB=shelve.open("%s%sMoleculeLibrary.shelve"%(directory,os.sep),writeback=True) I use writeback to True as I found the system tends to be unstable if I don't. After the computations the system needs to close the database, and store it back. Now the database (the table) is about 540MB, and it is taking ages. The time exploded after the table grew to about 500MB. But I need a much bigger table. In fact I need two of them. I am

React Native - Firebase auth persistence not working

主宰稳场 提交于 2019-11-30 04:13:21
Firebase auth does not persist logged in user and everytime I refresh or reopen app I have to sign in again. I have tried setting persistence to local and the callback does verify its set but the persistence is still no working For setting persistence I am using... //set auth persistence firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL) .then(function() { console.log("successfully set the persistence"); }) .catch(function(error){ console.log("failed to ser persistence: " + error.message) }); . . . For signing in I am using this code firebase.auth().signInWithEmailAndPassword

PHP Database connection practice

*爱你&永不变心* 提交于 2019-11-30 04:06:38
I have a script that connects to multiple databases (Oracle, MySQL and MSSQL), each database connection might not be used each time the script runs but all could be used in a single script execution. My question is, "Is it better to connect to all the databases once in the beginning of the script even though all the connections might not be used. Or is it better to connect to them as needed, the only catch is that I would need to have the connection call in a loop (so the database connection would be new for X amount of times in the loop). Yeah Example Code #1: // Connections at the beginning

Comparing persistent storage solutions in python

▼魔方 西西 提交于 2019-11-30 04:06:25
I'm starting on a new scientific project which has a lot of data (millions of entries) I'd like to store in an easily and quickly accessible format. I've come across a number of different potential options, but I'm not sure how to pick amongst them. My data can probably just be stored as a dictionary, or potentially a dictionary of dictionaries. Some potential considerations: Speed. I can't load all the data off disk every time I start a new script, and I'd like as quick access to random entries as possible. Ease-of-use. This is python. The storage should feel like python. Stability/maturity.

Firebase offline capabilities in ionic / cordova

若如初见. 提交于 2019-11-30 03:59:32
问题 Has anybody implemented a native app with Firebase with full offline capabilities in Android/iOS? Could this be done in Cordova/Ionic with a plugin that uses the native Firebase SDKs? We are building an app that has connection at download and first start but then we have to assume there is no more internet connection for a while and all content from the database has to be available offline. Is Firebase suitable for this requirement or do we have to use CouchDB/PouchDB or any other alternative

What is the difference between business class and domain class? What is meant by persistent classes?

拜拜、爱过 提交于 2019-11-30 03:32:19
What is the difference between business class and domain class? What is meant by persistent classes? Pascal Thivent A domain class is a class from the Domain Model that Martin Fowler describes as follow in Patterns of Enterprise Application Architecture : An object model of the domain that incorporates both behavior and data. At its worst business logic can be very complex. Rules and logic describe many different cases and slants of behavior, and it's this complexity that objects were designed to work with. A Domain Model creates a web of interconnected objects, where each object represents

Ways of unit testing data access layer

南笙酒味 提交于 2019-11-30 03:24:52
I have be trying to look for an effective way in unit testing my data access layer in C#. I'm primary a Java developer and have only used C# for about 6 months, in the past i've used a library called DBUnit to test against a known state database. I haven't been able to find a similar active library that can be used, closest seems to be nDBUnit but it hasn't been active for awhile now. There seems to be a lot of conflicting methods on how and why in C#. Ideally I want to test the data access layer using mocking without the need to connect to a database and then unit test the store procedure in

object persistence in php

怎甘沉沦 提交于 2019-11-30 03:18:45
I am fairly new to web programming, I have mainly used java to create desktop applications in the past. I'm trying to figure out how to create persistent objects in php. Maybe persistent isn't the right word, I don't want the object to be unique to each client, like i would get by serializing it in a session variable. I want the object to be created on the server and have that same object be accessible at all times. The object would query the database and store some data. This way, each page load, the php code would get that data from the same persistent object rather than having to query the