persistence

Data persistence for python when a lot of lookups but few writes?

Hi, I am working on a project that basically monitors a set remote directories (FTP, networked paths, and another), if the file is considered new and meets criteria we download it and process it. However i am stuck on what the best way is to keep track of the files we already downloaded. I don't want to download any duplicate files, so ...

Hibernate Query to fetch records on date ignoring timestamp

I have a timestamp column tradedate in one of the DB(Oracle) tables. I am using hibernate as the persistence layer to fetch and store Data to DB. I have a requirement in which I need to query the DB on date. i.e From UI the user passes a date and I need to get the filtered data based on this date. If the tradedate column only has the d...

How to use java.sql.Timestamp as real java.util.Date with JPA

I have a problem about the management of dates with milliseconds. I understand the need to use the TIMESTAMP to store milliseconds: @Temporal(TIMESTAMP) @Column(name="DATE_COLUMN", nullable = false) @Override public java.util.Date getDate() { return this.date; } But if I can't compare this date to another instance of java.util.Date, u...

Does JPA support a kind of "Any" mapping for embeddable objects?

Hi, I'm extending the data model of an Java application to include some kind of a setting facility. Settings in this application would basically be Strings or Numbers, no entities or other model objects. My Question is what's the best way to map this requirement to JPA (Hibernate)? I first thought about implementing a Setting class wi...

Detached object in hibernate

What is the benefit of detached object? What value do they provide? Thanks. ...

Lift mapper afterCreate before afterSave

Hi, do you know why afterCreate methods are not invoked after creating the object? Look at this code: val c = Company.create println(">>> After create") c.save Which produces: c: com.subeli.officebook.model.Company = 0 >>> After create create packages create packages save packages The Company model looks like this: object Company...

Using non-persistence related methods and fields in persistence entity

I have a persistence related java-ee code which I need to rewrite to make the app work on the Google App Engine and its data storage. When I use java-ee persistence providers, I generate persistence entities with my IDE and I keep them the way they are in case I need to regenerate them. However autogenerating entity classes for app-engin...

Rails: How do I call `self.save` in my model and have it persist in the database?

I'm trying to keep model logic within my model, but I can't get it to perform modifications on itself and have them persist in the database. In my controller: @article.perform_some_calulcations! In my model: def perform_some_calculations! self.foo.gsub!(/regexp/, 'string') self.save end If I drop debugger statements into my me...

how to scale databases

Can someone give me a quick rundown on the old and latest research on scaling databases or storage? I have heard of master/slave. What else are there? Thanks! ...

extbase mapping to an existing table doesn't work

I've extended the pages table and now I want to use some of the data in a domain object called "Tags". So I tried the following in the /Configuration/TypoScript/setup.txt: plugin.myextension.persistence.classes.Tx_myextension_Domain_Model_Tag { mapping { tableName = pages recordType = Tx_myextension_Domain_Model_Tag ...

Crash when use SQlite Persistence Object on iphone device

I use SQLite Persistence Object in my App. It's working well on simulator but when i deploy on the device. Sometime it's work, sometime not. My app often is crashed and i got:"Program received signal: “EXC_BAD_ACCESS”." on Debugger Console. In the Debugger i got: #0 0x3153311c in sqlite3_blob_write #1 0x31501b7c in sqlite3_os_end #2...

maintain session/connection between php and java app

A) If I have a java application which starts up and waits for socket connections on a specified port. Is there a way i could maintain a session connection in php after a user validates, i.e a persistent connection? B) I mean, I'm trying to understand how its done with mysql and php. How does mysql or php know what the last opened connec...

Best practice in ColdFusion ORM

A question of ColdFusion ORM We are using ColdFusion 9 for the past 6 months and while we've used some of the new features, ORM is something we've avoided because we usually work on the same very large website. Over the years we've used Apache OBJ but then we moved back to CF and used our own DAO objects generated from tables to handle ...