persistence

how to save user registration in the exe… (C#)

自作多情 提交于 2020-01-05 04:49:07
问题 Is this even possible? I realize that asking them to enter data when the program runs and saving it in the executable file itself is out. (Or is it?) Right now I'm considering trying to build the program server-side with php and have it incorporate a separate text file which would contain the information. This seems marginally feasible, though I would have quite a bit of learning to accomplish it. I was hoping for some other ideas of how I might accomplish this. I am not interested in

Equals for persistent objects

僤鯓⒐⒋嵵緔 提交于 2020-01-05 04:42:09
问题 There is well known problem with implementing equals() (and hashCode(), i will speak about equals() only) for persistance object with database managed id. New object is not stored in database, therefore does not have database identity, therefore its "id" field is null (or 0 if it is primitive type). If equals look at id, it will consider all new objects equal, and once it gets id, hash code change so if it already was in hash sensitive collection, it will not be found. One solution is using

Version of the parent object does not change when its child object's state changes

北战南征 提交于 2020-01-04 15:54:54
问题 I am using Hibernate3 I have a simple one to many relationship(Parent object has as set of child objects) if the child objects are added/removed, the version of the parent object is updated where as if the state of the child object is changed, the version of the parent is not getting updated. Here is the mapping - Category.hbm.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate

wso2 wait loop doesn't work after restart

风格不统一 提交于 2020-01-04 10:36:41
问题 I've developed a pooling logic in bpel process on the WSO2 BPS 3.0.0 connected to a Postgresql 9 DB. It looks like this: <bpel:repeatUntil name="RepeatUntilIncidentCompleted"> <bpel:sequence name="CheckIncidentStatus"> <bpel:wait name="Wait"> <bpel:for expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA['PT1M']]></bpel:for> </bpel:wait> <!-- invoke a service, copy status to a vStatus variable --> </bpel:sequence> <bpel:condition expressionLanguage="urn:oasis:names:tc

Updating and persisting dataset problem

霸气de小男生 提交于 2020-01-04 02:42:20
问题 I think I'm missing sth. trivial here : I want to update a dataset and push it back to the database where it came from, but I am keep getting a : Concurrency violation: the UpdateCommand affected 0 of the expected 1 records. Here's some code producing this error : public static void UpdateNorthWindWithDataset() { string connString = @"Data Source=localhost;Initial Catalog=NorthWind;Integrated Security=SSPI;"; using (SqlConnection conn = new SqlConnection(connString)) { conn.Open(); //

Eclipselink Entity is not recognized

删除回忆录丶 提交于 2020-01-04 02:11:08
问题 I have Versions which may rely on other Version. The dependent Versions are stored in the List dependsOn . Because I need to be able to determine, in what other Versions a specific Version is used I have the List usedIn which is the inverse of dependsOn. My Problem is as soon as I add methods to add/remove a single Version from dependsOn EclipseLink does not recognize my class Version as entity anymore. My Version class: @Entity @Table( name = "tbl_version" ) @NamedQueries( /*...*/ ) public

How are Websphere MQ messages stored to allow persistence?

青春壹個敷衍的年華 提交于 2020-01-03 18:01:21
问题 Are Websphere MQ messages stored in a database or filesystem? Can I configure it to use MySQL? 回答1: WebSphere MQ persistence is always a local filesystem for distributed platforms. On the mainframe there is the possibility of using a DB2 database in a Sysplex with a Coupling Facility but for everything else it is a filesystem. Also, there is no local persistence for WebSphere MQ clients. Only the queue manager will persist messages. In the WebSphere family, WebSphere Application Server's

How are Websphere MQ messages stored to allow persistence?

跟風遠走 提交于 2020-01-03 18:01:08
问题 Are Websphere MQ messages stored in a database or filesystem? Can I configure it to use MySQL? 回答1: WebSphere MQ persistence is always a local filesystem for distributed platforms. On the mainframe there is the possibility of using a DB2 database in a Sysplex with a Coupling Facility but for everything else it is a filesystem. Also, there is no local persistence for WebSphere MQ clients. Only the queue manager will persist messages. In the WebSphere family, WebSphere Application Server's

How to generate schema for JPA entity

为君一笑 提交于 2020-01-03 05:13:20
问题 I am having a JPA entity for "User". I want to generate a sql statement for this entity using maven hibernate3 Plugin. I tried using persistence.xml as configured in https://stackoverflow.com/questions/6855119/how-to-generate-schema-through-hibernate3hbdml-in-persistence-xml but my configuration fails. How to configure persistence.xml with any simple database and access the table created using maven hibernate3:hbm2ddl plugin. 回答1: Here is my example configuration for HSQLdb which generates

How to persist data in a ruby gem?

余生长醉 提交于 2020-01-03 02:31:08
问题 I'm developing a ruby gem for use in rails app. The gem need to "initialize" using live data from a webservice. But this initialization is a long process, and i want to save the initialization data somewhere. Where should i save it? I could save it in the parent rails app database, but i would need to create tables and migrations, and this isn't ideal. I'm thinking of using a text file or redis database inside the gem folder... Is this a good practice? Thanks. 回答1: ActiveSupport has several