Search Results

Search found 4565 results on 183 pages for 'nhibernate mapping'.

Page 140/183 | < Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >

  • Grails searchable plugin

    - by Don
    Hi, In my Grails app, I'm using the Searchable plugin for searching/indexing. I want to write a Compass/Lucene query that involves multiple domain classes. Within that query when I want to refer to the id of a class, I can't simply use 'id' because all classes have an 'id' property. Currently, I work around this problem by adding the following property to a class Foo public Long getFooId() { return id } static transients = ['fooId'] Then when I want to refer to the id of Foo within a query I use 'fooId'. Is there a way I can provide an alias for a property in the searchable mapping rather than adding a property to the class?

    Read the article

  • How to find NSOutlineView row index when using NSTreeController

    - by velocityb0y
    I'm using an NSTreeController to manage nodes for an NSOutlineView. When the user adds a new item, I create a new object and insert it: EntityViewEntityNode *newNode = [EntityViewEntityNode nodeWithName:@"New entity" entity:newObject]; // Insert at end of group // NSIndexPath *insertAt = [pathOfGroupNode indexPathByAddingIndex:[selected.children count]]; [entityCollectionTreeController insertObject:newNode atArrangedObjectIndexPath:insertAt]; Now I'd like to open the table column for edit so the user can name the new item. This seems logical: NSInteger row = [entityCollectionOutlineView rowForItem:newNode]; [entityCollectionOutlineView editColumn:0 row:row withEvent:nil select:YES]; However, row is always -1 indicating the object isn't found. Poking around reveals that the tree controller is not actually putting my objects directly in the tree, but is wrapping them in a node object of its own. Anyone have insight into how I would go about getting a row index relative to the outline view, so I can do this (without, hopefully, enumerating everything in the outline view and figuring out the mapping back to my node?)

    Read the article

  • What are the best options for a root filesystem hosted on SSD under Linux

    - by stsquad
    I'm working on an embedded system which is going to be booting and hosting it's rootfs on an SSD disk. We are currently looking at using Intel X-18M SSDs. The file system structure will have a fairly static /usr section (modulo software upgrades) and an active /var and /var/log for maintaining state and logging. Given the wear-levelling done by the underlying flash does having separate partitions help or hinder? As modern SSDs appear as straight block devices and hide their mapping magic behind their firmware is there any point trying to optimise the choice of file-system that sits on-top of the SSD? Finally does enable SMART monitoring make any sense in this context or are their SSD specific ways of determining the underlying health of the storage hardware?

    Read the article

  • how to manage vim plugin

    - by Haiyuan Zhang
    I want to know how do you manage your vim plugins. As it is, One of the biggest fun of using is that one can easily try many interesing new plugins, just download it and unzip it in under ~/.vim. But if you try too often and try too much, you might get trouble as confilct of key mapping , in compatitble script version, dpendency between different plugin ..... Then you want to remove some plugin ,kind of like rollback your vim to a sound condition. But, the rollback could be very painful . cus for some "giant" plugin, like perl-support ( it's great plugin, anyway), will consist of many vim scripts which spread in different dirctories. To remove single one giant plugin will be anoying, not too mention if you remvoe many plugin at one time. In a word , I'm looking for good practice for managing vim plugins.

    Read the article

  • JPA : Inheritance - Discriminator value not taken into account in generated SQL

    - by Julien
    I try to use this mapping : @Entity @Table(name="ecc.\"RATE\"") @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name="DISCRIMINATOR", discriminatorType= DiscriminatorType.STRING) public abstract class Rate extends GenericBusinessObject { ... } @Entity @DiscriminatorValue("E") public class EntranceRate extends Rate { @ManyToOne @JoinColumn(name = "\"RATES_GRID_ID\"") protected RatesGrid ratesGrid; ... } @Entity @Table(name="ecc.\"RATES_GRID\"") public class RatesGrid extends GenericBusinessObject { /** */ @OneToMany(mappedBy = "ratesGrid", targetEntity = EntranceRate.class, fetch=FetchType.LAZY) private List<EntranceRate> entranceRates; } When I try to access my entranceRates list from a ratesGrid object, I get this error : Object with id: 151 was not of the specified subclass: com.ecc.bo.rate.EntranceRate (loaded object was of wrong class class com.ecc.bo.rate.AnnualRate) Looking at the sql generated, I found no trace of "discriminator=" in the where clause. What am I doing wrong ? I use a PostGreSQL database and a Hibernate as JPA provider.

    Read the article

  • XSD data set with Oracle database

    - by Ed Woodcock
    Hi folks, I'm having a major issue with an XSD dataset mapping thingy that I'm using within my current project. We are using XSDs for some data abstraction (it's quicker and debatably more maintainable that using Parameterised SQL or a StoredProc), and on my machine (running in the VS development environment) thy're working fine. However, on the Pre-production server we use for our testing, the XSDs are not working correctly: some method calls will fail with the following error: System.ArgumentException: Value does not fall within the expected range. at Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value) Has anyone ever encountered this issue before? The methods being called are simple select statements using 1-3 parameters, and as I said before they work fine on my machine.

    Read the article

  • GWT Date Picker Format problem when saving a java date through hibernate in postgresql

    - by Noor
    Hi, I am using Java Date and Hibernate which is then being saved in the database (Postgresql). I am not that good in hibernate Part of the Mapping File <property name="DateOfBirth" type="java.util.Date"> <column name="DATEOFBIRTH" /> </property> I am using GWT Date picker Short date format i.e. yyyy-MM-dd. I am getting the value from the date picker using View.getUserDateOfBirth().getValue() But when I am saving the date 2010-11-30 into the datebase it is saving it as 2010-11-30 00:00:00 instead of 2010-11-30 So, I want it to be saved in the database as in this format 2010-11-30?? I have many things such timestamp but i not being able to configure it. I think this part <property name="DateOfBirth" type="java.util.Date"> <column name="DATEOFBIRTH" /> </property> should be changed but I do not know what to change

    Read the article

  • Is there a production ready web application framework in Python?

    - by peperg
    I heard lots of good opinions about Python language. They say it's mature, expressive etc... Are there any production-ready web application frameworks in Python. By "production ready" I mean : supports objective-relational mapping with caching and declarative desciption (like JPA, Hibernate etc..) controls oriented user interface support - no HTML templates but something like JSF (RichFaces, Icefaces) or GWT, Vaadin, ZK component decomposition and dependency injection (like EJB or Spring) unit and integration testing good IDE support clustering, modularity etc (like Terracota, OSGi etc..) there are successful applications written in it by companies like IBM, Oracle etc (I mean real business applications not Twitter) could have commercial support Is it possible at all in Python world ? Or only choices are : use Python and write everything from the bottom (too expensice) stick to JEE buy .NET stack

    Read the article

  • Unidirectional OneToMany in Doctrine 2

    - by darja
    I have two Doctrine entities looking like that: /** * @Entity * @Table(name = "Locales") */ class Locale { /** * @Id @Column(type="integer") * @GeneratedValue(strategy="IDENTITY") */ private $id; /** @Column(length=2, name="Name", type="string") */ private $code; } /** * @Entity * @Table(name = "localized") */ class LocalizedStrings { /** * @Id @Column(type="integer") * @GeneratedValue(strategy="IDENTITY") */ private $id; /** @Column(name="Locale", type="integer") */ private $locale; /** @Column(name="SomeText", type="string", length=300) */ private $someText; } I'd like to create reference between these entities. LocalizedStrings needs reference to Locale but Locale doesn't need reference to LocalizedStrings. How to write such mapping via Doctrine 2?

    Read the article

  • Restkit Serializing a Boolean from NSNumber

    - by angelokh
    One of managed objects has one attribute 'isMember' represented by NSNumber type. When serialize to Json post body by RestKit, it always give 0/1 instead of YES/NO or true/false. When mapping from json result to objects, RestKit is able to successfully turn YES/NO to NSNumber. What is the way to force serialize the boolean attribute to YES/NO or true/false? Serialize: 0 -> 0, 1 -> 1 Deserialize : YES/true -> 1, NO/false -> 0

    Read the article

  • Unidirectional One-to-Many Associations in Entity Framework 4?

    - by Eric J.
    Does EF 4 support unidirectional one-to-many associations, as in: public class Parent { public int Id { get; set; } public string Something { get; set; } public List<Child> AllMyChildren { get; set; } } public class Child { public int Id { get; set; } public string Anotherthing { get; set; } // I don't want a back-reference to the Parent! // public int ParentId { get; set; } } When I try to compile my project with an association between Parent and Child where End2 Navigation is blank (because I unchecked the End2 Navigation Property checkbox in the Add Association dialog), I get Error 2027: No mapping specified for the following EntitySet/AssociationSet - Child.

    Read the article

  • Avoid implicit conversion from date to timestamp for selects with Oracle using Hibernate

    - by sapporo
    I'm using Hibernate 3.2.7.GA criteria queries to select rows from an Oracle Enterprise Edition 10.2.0.4.0 database, filtering by a timestamp field. The field in question is of type java.util.Date in Java, and DATE in Oracle. It turns out that the field gets mapped to java.sql.Timestamp, and Oracle converts all rows to TIMESTAMP before comparing to the passed in value, bypassing the index and thereby ruining performance. One solution would be to use Hibernate's sqlRestriction() along with Oracle's TO_DATE function. That would fix performance, but requires rewriting the application code (lots of queries). So is there a more elegant solution? Since Hibernate already does type mapping, could it be configured to do the right thing? Update: The problem occurs in a variety of configurations, but here's one specific example: Oracle Enterprise Edition 10.2.0.4.0 Oracle JDBC Driver 11.1.0.7.0 Hibernate 3.2.7.GA Hibernate's Oracle10gDialect Java 1.6.0_16

    Read the article

  • Unique element ID to reference later

    - by Hanpan
    I'm trying to figure out a method of storing a unique reference to each tag on a particular page. I won't have any ability to edit the page content and I'll the generated UID to stay the same on every page refresh. Since browsers don't generate any kind of UID for elements, I was thinking that the only method to do this would be to execute a script which walks the DOM and creates a UID for each it comes across. I don't know how accurate this will be, especially considering I'll need to ensure it creates the same UID for the tag each time the script crawls the page. Can anyone think of any other, more accurate ways of mapping a page? Many thanks.

    Read the article

  • In VisualStudio 2008, emacs mode - how can you enable "overwrite"?

    - by Abby Fichtner
    Using VisualStudio 2008, have emacs keyboard mapping scheme enabled. If I select text and try to paste over it, it INSERTS the new text, rather than replacing it. Also, if I select text and hit DELETE it deletes the first character AFTER the selected text (just as if I didn't have any text selected). Does anyone know how to fix this so that I get the standard windows behavior. That is: If I select text and try to paste over it, it replaces the selected text with what I pasted in. If I select text and hit the DELETE key, it actually deletes the text I have selected Thanks! Abby

    Read the article

  • Passing a Java object from one Struts action to another

    - by Bernhard V
    Hello! In one of my Struts action I've got the following code in a method: ... List<Object> retrievedListOfObjects = c.getListOfObjects(); return mapping.findForward("fw_view"); } fw_view leads to a new Struts action with another Struts form. Let's say this form has got among others the following field List<Object> listOfObjects; I now want to pass the retrievedListOfObjects from within the first Struts action to the form of the following Struts action. Is this possible without storing it in the session?

    Read the article

  • Get all related products based on their full-text search relationship

    - by MikeJ
    I have a Product table with the fields Id, Title, Description, Keywords (just comma separated list of keywords). Table is full-text indexed. When I view one product, I do a query and search the full-text catalog for any related products based on the Keywords field. select * from Products where Contains(Products.*, @keywordsFromOneProduct) Works like a charm. Now I would like to list all products and all their related products in a big list and I want to avoid calling this method for each item. Any ideas how could I do it? I was thinking about a job that would go through products one by one and build a one-many mapping table (fields ProductId, RelatedProductId), but I wonder is there a better way?

    Read the article

  • Visual Studio 2008. MFC event wizard broken

    - by G Forty
    OK, so it's almost a programming question - The VS2008 dialog event wizard has stopped working. Double-clicking on a button in an MFC dialog project does not fire the wizard as usual and a right-click to get to the 'Add Event Handler...' shows a dialog with no message types. Further to this the MFC message mapping and virtual class listing that generally appears in the properties window (Alt + Enter) is now empty. Has anyone elese seen this and if so, how'd they fix it? I have 'repaired' my VS08 installation ... Thx++ Jerry

    Read the article

  • Date format strings in .Net and Java

    - by mizipzor
    I have an application that runs on both C# .Net and Java. Two entirely separate but identical code bases. The problem Im having is formatting date and numbers. For example: A user running the .Net variant is inputting a date and a format string. The 26th of April 1986 is formatted 1986-04-26. The actual date, along with the format string, is serialized to an XML file. Later another user running the Java variant opens said XML file and looks at the date. I want them to look the same. Whats the best approach here? There doesnt seem to be a one-to-one mapping between Java and .Nets format strings. Should I limit the possible formats to a selection I know I can represent fully in both .Net and Java?

    Read the article

  • Grails and googleJsonAPIService

    - by Calahad
    I am using the googleJsonAPIService to manipulate users (CRUD). This is how I get the Directory instance: def getBuilder() { def builder def httpTransport = googleJsonAPIService.makeTransport() def jsonFactory = googleJsonAPIService.makeJsonFactory() def requestInitialiser = googleJsonAPIService.getRequestInitialiser() builder = new Directory.Builder(httpTransport, jsonFactory, requestInitialiser); return builder } Directory getGoogleService() { Directory googleService = getBuilder().build() return googleService; } Once I have this service, I use it to get a user's details (in my own service) for example: def query = getGoogleService().users().get(id) return handleException { query.execute() } I manually populate a DTO with the result of that query, and this is where my question comes: Is there an elegant way to have this mapping (object returned to DTO) done automatically so all I have to do is pass the class of the object to be returned? This is the structure of the object returned by google : ["agreedToTerms":true,"changePasswordAtNextLogin":false, "creationTime":"2013-11-04T04:33:35.000Z", "emails":[{"address":"[email protected]","primary":true}],...]

    Read the article

  • Xml files stop being served by IIS6 after allowing .net to process the .xml extension

    - by Brian Surowiec
    I added a route into my site to allow for a sitemap and everything worked fine in IIS7 but once I deployed the route stopped working. Since the live server is running IIS6 I needed to put a new mapping in for .xml to be processed by .net and then it started to work. My issue though is on every other xml file on the site now. I keep getting a 404 error when trying to view xml files, but the sitemap.xml route works. Is this a routing issue or an IIS setup issue? Here are my routes if it will help routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( "Gallery-Group-View", "Projects/{groupId}", new { controller = "Gallery", action = "GalleryList", groupId = "" }); routes.MapRoute( "Gallery-List-View", "Projects/{groupId}/{galleryId}", new { controller = "Gallery", action = "GalleryView", groupId = "", galleryId = "" }); routes.MapRoute( "Sitemap", "Sitemap.xml", new { controller = "XML", action = "Sitemap" } ); routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } );

    Read the article

  • Strange exception while using linq2sql

    - by zerkms
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: mapping Source Error: Line 45: #endregion Line 46: Line 47: public db() : Line 48: base(global::data.Properties.Settings.Default.nanocrmConnectionString, mappingSource) Line 49: { this is what i get if i implement such class: partial class db { static db _db = new db(); public static db GetInstance() { return _db; } } db is a linq2sql datacontext why this hapenned and how to solve this?

    Read the article

  • Using Hibernate with Dynamic Eclipse Plug-ins

    - by AlbertoPL
    I have classes that are named exactly the same across different plug-ins that I use for my application, and I'd like to be able to configure them properly with Hibernate. The problem is that it looks like Hibernate dynamically generates a class' package name when trying to find a class when it's doing its mapping. With one plug-in this scheme works, but across multiple plug-ins it's not working. It looks like Hibernate gets confused when dealing with Hibernate configuration files across multiple plug-ins. Is this because each plug-in has its own class-loader? What is the best way to proceed to make this work with the existing plug-ins and Hibernate?

    Read the article

  • Castor: how to map a simple list of strings?

    - by Dmitriy
    I have the following field in my class: private List<String> messages; Here's the mapping I have: <field name="messages" collection="arraylist" type="string" container="false> <bind-xml name="errors" node="element"/> </field> This is what I get as a result of marshalling: <errors><string>message1</string><string>message2</string></errors> And this is what I want to achieve: <errors><error>message1</error><error>message2</error></errors> Any help is appreciated!

    Read the article

  • Getting sign of an integer in Assembly

    - by Sagekilla
    Hi all, I'm writing some assembly for a project using MASM (32-bit), and I was wondering what would be the easiest way to do this: int delta = A - B; int value = floor((delta + sign(delta)) / 2); Which is basically the following mapping: For 1 < A < 9, and B = 5: A = [1, 2] -> -2 A = [3, 4] -> -1 A = [5] -> 0 A = [6, 7] -> +1 A = [8, 9] -> +1 Any help is much appreciated!

    Read the article

  • feature extraction from acoustic signals

    - by Dolphin
    Hi everyone, It's been a while. I found APIs in Java for extracting features from acoustic audio files and symbolic files separately. But now I have a problem in mapping from low level wav audio features to high level midi features. i.e. I need to write the extracted wav audio features on to midi format. But I cannot think of anything even close to it. Can someone pls provide me some insight as in how I can approach this. Greatly appreciate your responses. Advance thanks

    Read the article

< Previous Page | 136 137 138 139 140 141 142 143 144 145 146 147  | Next Page >