Questions tagged [persist]

558 questions
6
votes
1 answer

JPA EntityManager persist() causing object to appear detached even though an error was thrown

Hi I have a simple DAO with the below function. public element createElement(Element e){ em.persist(e); em.flush(); return e; } The Entity table has a unique constraint on the pair (type,value) and I have a test below: public…
Link19
  • 586
  • 1
  • 18
  • 47
6
votes
1 answer

Spark Databricks fraction cached is dropping after an action (Scala)

I use persist command to cache a dataframe on MEMORY_AND_DISK and have been observing a weird pattern. A persisted dataframe is cached to 100% when that specific job (Job 6, in the below screenshot) which does the necessary transformations is…
Sushant Pachipulusu
  • 5,499
  • 1
  • 18
  • 30
6
votes
2 answers

How can I make persisting simple in Symfony2?

I'm currently playing around with Symfony2 and like it very much so far. One question has arisen though and I'm wondering what the best practice would be. If I want to persist an entity I have to go like this:
sprain
  • 7,552
  • 6
  • 35
  • 49
6
votes
3 answers

C#: ID-field of Microsoft.Office.Interop.Excel.Range is not persisted with an Excel-sheet

before I start with the problem, I want to motivate it. My task is to analyse changes in an Excel-Sheet, but different from recording changes via the in-build mechanism the changes should be detected programmatically and even if the user deactivated…
Alexander Pacha
  • 9,187
  • 3
  • 68
  • 108
6
votes
3 answers

Spring transactional context doesn't persist data

I know that my problem is a common problem, but I've checked a lot of questions here, checked Spring documentation and I really don't know what I am doing wrong. My problem: I've got a Spring WebFlow project using JPA (implementation: OpenJPA +…
Arek Woźniak
  • 695
  • 3
  • 12
  • 25
6
votes
2 answers

Redux Store to subscribe to a particular event only? store.subscribe()

I'd like to persist some user data to localStorage and need for the store to subscibe to state change but I don't want to fire each time the state changes but rather only when a particular event happens as in my case a user_update event. Any ways…
Fabrice
  • 465
  • 1
  • 5
  • 17
6
votes
3 answers

remove dynamicallly created radiobuttons from a radiogroup in Android

:) My RadioGroup's RadioButtons get dynamically created from an ArrayList (which resides in my main activity) full of links like so: ArrayList = { "hxxp://helloworld.com", "hxxp://helloworld2.net", ..., "hxxp://whatever.com" } then I have a new…
jeremy
  • 145
  • 1
  • 2
  • 6
6
votes
1 answer

How do you store data from NSMutable Array in Core Data?

The app i'm making draws a Polyline based on the users coordinates from CLLocationManager (these are all kept in an NSMutableArray) When the app closes, the current polyline disappears. How can I store the array of points in CoreData to be retrieved…
Peeter Vedic
  • 101
  • 1
  • 3
  • 8
6
votes
1 answer

JPA Cascade Persist Error

I have a One-to-Many relationship: A ProductCategory can contains many Product. This is the code: @Entity public class Product implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private String id; …
user477768
6
votes
2 answers

Hibernate will not persist data after save

Can someone explain why the "lastAccessed" date does not get saved to the database in this example and how I can get it to save to the DB? My understanding is that the do object is an attached object after the save() call and therefore all…
Eric
  • 63
  • 1
  • 5
5
votes
1 answer

Windows Workflow - PersistableIdle

In our company we have a business process that needs to: Get data from X Wait for user Y to do research Get data from Z based on step 2 data In researching this, it seems like there are a few options to implement this in workflow. Add a delay…
user472292
  • 1,069
  • 2
  • 22
  • 37
5
votes
3 answers

'Unexpected element: XX' during deserialization MongoDB C#

I'm trying to persist an object into a MongoDB, using the following bit of code: public class myClass { public string Heading { get; set; } public string Body { get; set; } } static void Main(string[] args) { var mongo =…
smolesen
  • 1,153
  • 3
  • 11
  • 29
5
votes
0 answers

Difference in working between unpersist and unpersist(blocking: boolean)

I am working on an attribution report and i am caching the dataframe since it is being used frequently in the later stage of the code. Once the usage is done, should i unpersist() or unpersist(true). I understand the basic difference would be async…
5
votes
1 answer

Symfony2 and Doctrine $em->persist VS $em->merge

Hi there I've got a quick question regarding Doctrine and the difference between merge() and persist() I have a NewsBuilder class: This takes a News Entity and checks to see if it exists in the database, if it does it sets the values of the entity…
Dizzy Bryan High
  • 2,015
  • 9
  • 38
  • 61
5
votes
2 answers

yesod how to show the pure value of a PersistInt64 key

Dog name Text race Text getAllDogsR :: Handler Html getAllDogsR = do Dogs<- runDB $ selectList [] [Asc DogName] defaultLayout [whamlet|
    $forall Entity dogid dog <- Dogs …
BARJ
  • 1,543
  • 3
  • 20
  • 28
1 2
3
37 38