Recently I've been requested to add on something for the administrator of a site where he can 'feature' something.
For this discussion let's say it's a 'featured article'.
So naturally we already have a database model of 'articles' and it has ~20 columns as it is so I really do not feel like bloating it anymore than it already is.
My ...
Hi. I have a button in a .xhtml file which calls a javascript function which calls a java function remotely (in jboss seam environment). That java function has an entityManager.persist(object). Do you know why this line of code doesn't commit to the DB?
It says something that a transaction hasn't started. I supose in a remote context i d...
EntityManager.merge() can insert new objects and update existing ones.
Why would one want to use persist() (which can only create new objects)?
...
Hi,
we are using Toplink implementation of JPA + Spring + EJB. In one of our EJBs we have something like this:
public void updateUser(long userId, String newName){
User u = em.get(User.class, userId);
u.setName(newName);
// no persist is invoked here
}
So, basically this updateUser method is supposed to update the name of...
Hello,
I try to delete an item from a hash map with hibernate.
Here is my config on the collection:
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@OneToMany(mappedBy = "game", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@Where(clause = "charactType='charact'")
@MapKey(name = "shortcut")
@Cascade(org.hibernate.annotations....
I'm having this strange problem where my merge() or my persist() functions are not being reflected in the database.
My JdbcProductDao.java:
@Repository("productDao")
public class JdbcProductDao implements ProductDao {
@PersistenceContext
private EntityManager entityManager;
public JdbcProductDao(){
}
public Produc...
In my app I'm using an NSUserDefaults object to store the username, password and server URL in the built-in Settings app. If there is no data saved, the user is presented a login interface and upon succesful login the username and password are saved. Then in my app I have a view which displays this information, but the text is missing as...
Hello all, I have a list app where users hit the + button and enter in an item that they want to appear in the list and hit save. The table is saved with core data. The only problem is when the cell is taped I want a checkmark to be displayed. Ive enabled multiple selection with
UITableViewCell *thisCell = [tableView cellForRowAtIndexP...
Hi all, ive been creating a list app and backing it with core data. I would like to have a default list of say 10 airport items so that the user doesnt have to start from scratch. Is there any way to do this? Any help is appreciated. Thanks in advance.
...
Is there a way to have a declaration such as the following persist to all matching elements that are later added to the DOM?
$("a.my-class").replaceWith("<span>Replaced</span>");
Something along the lines of...
$("a.my-class").persist().replaceWith("<span>Replaced</span>");
(Persist is a fictitious method, that I hope conveys what ...
I have two entities: EXAM and EXAM_NORMAL.
EXAM
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Long id;
private String name;
private String codeName;
@Enumerated(EnumType.STRING)
private ExamType examType;
@ManyToOne
private Category category;
@OneToMany(mappedBy="id",cascade=CascadeTy...
I have legacy DB that store dates that means no-date as 9999-21-31,
The column Till_Date is of type DateTime not-null="true".
in the application i want to build persisted class that represent no-date as null,
So i used nullable DateTime in C# //public DateTime? TillDate {get; set; }
I created IUserType that knows to convert the entity ...
Hi.
Trying to run an MVC app on the 'portable' web server. Software is aspnetserve. (http://www.ohloh.net/p/aspNETserve)
Cookies do not persist. They do fine when I run from visual studio debug. Code is fine, seemingly.
Only are dead (fail to persist from page to page) when I use this server.
My solution requires deploying a portabl...
I have an abstract data type that behaves much like stack. It represents a history of "graph objects" made by a particular user.
Each "graph object" holds one or more "lines", a date range, keys, and a title.
Each "line" holds a sql generator configured for a particular subset of data in my db.
I would like for these "histories" to b...
I am looking for a way to have the options menu persist on screen after the menu button press until the menu is dismissed by one of the menu choices.
...
I have a JPA entity that stores a fk id, a boolean and a timestamp:
@Entity
public class ChannelInUse implements Serializable {
@Id
@GeneratedValue
private Long id;
@ManyToOne
@JoinColumn(nullable = false)
private Channel channel;
private boolean inUse = false;
@Temporal(TemporalType.TIMESTAMP)
private Date inUseAt = n...
I have an iPhone/iPad app using Core Data to keep my application data. Sometimes, even though I don't get any error messages, the data is not really saved so when the app starts anew, it's all gone. This problem seems to disappear after physically rebooting the device, but otherwise it's pretty random and hard to track. Has anyone seen a...
I've been using rails, merb, django and asp.net mvc applications in the past. What they have common (that is relevant to the question) is that they have code that sets up the framework. This usually means creating objects and state that is persisted until the web server is recycled (like setting up routing, or checking which controllers ...
I want to persist some data into a text file in my c# application. I added the text file to the root of my project.
How do i access it now? Will this file be embedded with my exe or what?
...
As part of what i am doing i need to access varaiables even after the session with the outllok is closed is there any way to persist value
...