Search Results

Search found 2412 results on 97 pages for 'relationship'.

Page 21/97 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • How do I migrate a ManyToOne to a ManyToMany relationship in Hibernate?

    - by spderosso
    I have a instance field of a class X that is mapped using Hibernate as a Many to One relationship. E.g: public class X{ ... @ManyToOne(optional=false) private Y iField; ... } That is correctly working with a particular schema. I know want to change this instance field iField to a List and a Many to Many relationship. public class X{ ... @ManyToMany(optional=false) private List<Y> iField; ... } What steps should I follow? Do I have to change the schema? in which way? In case you need more info let me know. Thanks!

    Read the article

  • Core Data: Fetch all entities in a to-many-relationship of a particular object?

    - by Björn Marschollek
    Hi there, in my iPhone application I am using simple Core Data Model with two entities (Item and Property): Item name properties Property name value item Item has one attribute (name) and one one-to-many-relationship (properties). Its inverse relationship is item. Property has two attributes the according inverse relationship. Now I want to show my data in table views on two levels. The first one lists all items; when one row is selected, a new UITableViewController is pushed onto my UINavigationController's stack. The new UITableView is supposed to show all properties (i.e. their names) of the selected item. To achieve this, I use a NSFetchedResultsController stored in an instance variable. On the first level, everything works fine when setting up the NSFetchedResultsController like this: -(NSFetchedResultsController *) fetchedResultsController { if (fetchedResultsController) return fetchedResultsController; // goal: tell the FRC to fetch all item objects. NSFetchRequest *fetch = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Item" inManagedObjectContext:self.moContext]; [fetch setEntity:entity]; NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; [fetch setSortDescriptors:[NSArray arrayWithObject:sort]]; [fetch setFetchBatchSize:10]; NSFetchedResultsController *frController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetch managedObjectContext:self.moContext sectionNameKeyPath:nil cacheName:@"cache"]; self.fetchedResultsController = frController; fetchedResultsController.delegate = self; [sort release]; [frController release]; [fetch release]; return fetchedResultsController; } However, on the second-level UITableView, I seem to do something wrong. I implemented the fetchedresultsController in a similar way: -(NSFetchedResultsController *) fetchedResultsController { if (fetchedResultsController) return fetchedResultsController; // goal: tell the FRC to fetch all property objects that belong to the previously selected item NSFetchRequest *fetch = [[NSFetchRequest alloc] init]; // fetch all Property entities. NSEntityDescription *entity = [NSEntityDescription entityForName:@"Property" inManagedObjectContext:self.moContext]; [fetch setEntity:entity]; // limit to those entities that belong to the particular item NSPredicate *predicate = [NSPredicate predicateWithFormat:[NSString stringWithFormat:@"item.name like '%@'",self.item.name]]; [fetch setPredicate:predicate]; // sort it. Boring. NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; [fetch setSortDescriptors:[NSArray arrayWithObject:sort]]; NSError *error = nil; NSLog(@"%d entities found.",[self.moContext countForFetchRequest:fetch error:&error]); // logs "3 entities found."; I added those properties before. See below for my saving "problem". if (error) NSLog("%@",error); // no error, thus nothing logged. [fetch setFetchBatchSize:20]; NSFetchedResultsController *frController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetch managedObjectContext:self.moContext sectionNameKeyPath:nil cacheName:@"cache"]; self.fetchedResultsController = frController; fetchedResultsController.delegate = self; [sort release]; [frController release]; [fetch release]; return fetchedResultsController; } Now it's getting weird. The above NSLog statement returns me the correct number of properties for the selected item. However, the UITableViewDelegate method tells me that there are no properties: -(NSInteger) tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; NSLog(@"Found %d properties for item \"%@\". Should have found %d.",[sectionInfo numberOfObjects], self.item.name, [self.item.properties count]); // logs "Found 0 properties for item "item". Should have found 3." return [sectionInfo numberOfObjects]; } The same implementation works fine on the first level. It's getting even weirder. I implemented some kind of UI to add properties. I create a new Property instance via Property *p = [NSEntityDescription insertNewObjectForEntityForName:@"Property" inManagedObjectContext:self.moContext];, set up the relationships and call [self.moContext save:&error]. This seems to work, as error is still nil and the object gets saved (I can see the number of properties when logging the Item instance, see above). However, the delegate methods are not fired. This seems to me due to the possibly messed up fetchRequest(Controller). Any ideas? Did I mess up the second fetch request? Is this the right way to fetch all entities in a to-many-relationship for a particular instance at all?

    Read the article

  • Deleted one membership table. Possible to import without breaking relationship?

    - by superexsl
    Hey, I hope this isn't going to be tricky/time consuming, so fingers crossed. I'm working with the ASP.NET membership table. However, I've got quite a few other tables that I've built, and most of them have a relationship with the dbo.aspnet_Membership table. I've accidentally deleted the dbo.aspnet_Membership table and can't get it back. There was no major data on it, (as it's on my local machine), but I would really like to copy and paste that one table from another database I have, mainly for the sake of not breaking the schema. Is this possible? I'm worried if I run the Aspnet_regsql.exe tool, it's going to break the schema and remove all data from the tables as well the relationships (which would take a while to re-establish). Is there any way I can import just the dbo.aspnet_Membership table into my current database? Thanks for the any advice!

    Read the article

  • How to sync passwords one-way between windows domains without trust relationship?

    - by Franco C.
    We're migrating from Windows 2003 to 2008 SBS. We will run concurrently for a short period of time. I cannot establish a trust relationship between Server 2003 & Server 2008 SBS and I would like to know if there is a way to sync the passwords between 2003-2008? For example, I would like to dump the pre-encrypted passswords to a file in 2003 and then use this to update the passwords for the correspoding usernames in 2008 SBS. Is this possible? I have no need to ever see the clear text version of the passwords. I see one commercial product, but it hardly seems worth it given the temporary nature of my project... Thanks, Franco

    Read the article

  • What is proper relationship between /etc/hosts and DNS A records for a Linux server?

    - by MountainX
    I have an Ubuntu server. It is going to be a web server with a URI of www.example.com. I have a DNS A record pointing www.example.com to the server's IP address. Let's say I pick "trinity" as the hostname for this server. I want to set up the DNS records correctly. I need reverse DNS to www.example.com, so a CNAME for www.example.com doesn't seem appropriate. Here's my question: Is it considered best practice to set up two DNS records (which in my case would likely be two A records), one for www.example.com and one for trinity.example.com, both pointing to this server's IP address? (Or, even if it is not accepted as a best practice, is it a good idea?) If so, would the following be a proper /etc/hosts file? $ cat /etc/hosts 127.0.1.1 trinity.local trinity 99.100.101.102 trinity.example.com trinity www.example.com This server is a Linode and Linode's docs seem to imply that the above approach is best (if I am reading them correctly). Here's the relevant section. I bolded the line that seems to apply here. Update /etc/hosts Next, edit your /etc/hosts file to resemble the following example, replacing "plato" with your chosen hostname, "example.com" with your system's domain name, and "12.34.56.78" with your system's IP address. As with the hostname, the domain name part of your FQDN does not necesarily need to have any relationship to websites or other services hosted on the server (although it may if you wish). As an example, you might host "www.something.com" on your server, but the system's FQDN might be "mars.somethingelse.com." File:/etc/hosts 127.0.0.1 localhost.localdomain localhost 12.34.56.78 plato.example.com plato The value you assign as your system's FQDN should have an "A" record in DNS pointing to your Linode's IP address. For more information on configuring DNS, please see our guide on configuring DNS with the Linode Manager.

    Read the article

  • OJB Reference Descriptor 1:0 relationship? Should I set auto-retrieve to false?

    - by godzillasdm
    Hi, I am having an issue while using Apache OJB with Spring 2 inside my web app. I'm using OJB reference-descriptor with 2 foreign key properties. I have an object A (parent) and object B (referenced object). The thing is, for an object A, there may or may not be an object B. In the case where there is no object B to go with Object A, the object B seems to be instantiated (through Spring?) anyways. However, I am unable to access object B's members. Whenever I test if Object B == null, it always returns false even though there is no matching value in the database. Since this Object is never null, I figured I can test the object's member like so: if( objectb.getDocumentNumber == null) { return false; } However, I get an exception in the jsp: javax.servlet.jsp.el.ELException: An error occurred while getting property "documentNumber" from an instance class org.sample.pojo.Objectb$$EnhancerByCGLIB$$78022a2 and this exception in the debugger when it's creating the objectB: com.sun.jdi.InvocationException occurred invoking method. I am guessing that the reference-descriptor must be a 1:1+ relationship, instead of a 1:0+ relationship. I was wondering if I should set the property 'auto-retrieve' to false, and then use the PersistenceBroker.retrieveAllReferences(Object obj); method as directed. However, this method's return value is 'void', so I am guessing that Spring somehow creates, and sets the reference class for me. (Returning me back to the same issue I'm having.) I will need a way to test whether the reference object exists first. If not, don't call this retrieveAllReferences method, but I don't see how. Am I going about this all wrong? Does reference-descriptor not allow 1:0 relations? Any work around to my problem? Your suggestions are greatly appreciated!

    Read the article

  • iPhone SDK Core Data: Fetch all entities with a nil relationship?

    - by Harkonian
    I have a core data project that has Books and Authors. In the data model Authors has a to-many relationship to Books and Books has a 1-1 relationship with Authors. I'm trying to pull all Books that do not have an Author. No matter how I try it, no results are returned. In my predicate I've also tried = NIL, == nil, == NIL. Any suggestions would be appreciated. // fetch all books without authors - (NSMutableArray *)fetchOrphanedBooks { NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Book" inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; [fetchRequest setFetchBatchSize:20]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"author = nil"]; [fetchRequest setPredicate:predicate]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:NO]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; NSString *sectionKey = @"name";//nil; NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:sectionKey cacheName:nil]; BOOL success = [aFetchedResultsController performFetch:nil]; NSMutableArray *orphans = nil; // this is always 0 NSLog(@"Orphans found: %i", aFetchedResultsController.fetchedObjects.count); if (aFetchedResultsController.fetchedObjects.count > 0) { orphans = [[NSMutableArray alloc] init]; for (Note *note in aFetchedResultsController.fetchedObjects) { if (note.subject == nil) { [orphans addObject:note]; } } } [aFetchedResultsController release]; [fetchRequest release]; [sortDescriptor release]; [sortDescriptors release]; return [orphans autorelease]; }

    Read the article

  • Is this a good KVO-compliant way to model a mutable to-many relationship?

    - by andyvn22
    Say I'd like a mutable, unordered to-many relationship. For internal optimization reasons, it'd be best to store this in an NSMutableDictionary rather than an NSMutableSet. But I'd like to keep that implementation detail private. I'd also like to provide some KVO-compliant accessors, so: - (NSSet*)things; - (NSUInteger)countOfThings; - (void)addThings:(NSSet*)someThings; - (void)removeThings:(NSSet*)someThings; Now, it'd be convenient and less evil to provide accessors (private ones, of course, in my implementation file) for the dictionary as well, so: @interface MYClassWithThings () @property (retain) NSMutableDictionary* keyedThings; @end This seems good to me! I can use accessors to mess with my keyedThings within the class, but other objects think they're dealing with a mutable, unordered (, unkeyed!) to-many relationship. I'm concerned that several things I'm doing may be "evil" though, according to good style and Apple approval and whatnot. Have I done anything evil here? (For example, is it wrong not to provide setThings, since the things property is supposedly mutable?)

    Read the article

  • Channel Revenue Management and General Ledger Integration

    - by LuciaC-Oracle
    Back in February of this year, we told you about the EBS Business Process Advisor: CRM Channel Revenue Management document which has detailed information about the Channel Revenue Management application business flow and explains integration points with other applications.  But we thought that you might like to have even more information on exactly how Channel Revenue Management passes data to General Ledger. Take a look at Integration Troubleshooting: Oracle Channel Revenue Management to GL via Subledger Accounting (Doc ID 1604094.2).  This note includes comprehensive information about the data flow between Channel Revenue Management and GL, offers troubleshooting tips and explains some key setups. Let us know what you think - start a discussion in the My Oracle Support Channel Revenue Management Community!

    Read the article

  • Your Feedback on Oracle Asset Tracking

    - by LuciaC-Oracle
    Oracle Asset Tracking Development strives to improve customer satisfaction with our Oracle Asset Tracking product.  In this context, they are very interested in getting your feedback about the Oracle Asset Tracking module. Recently, we have seen more and more customers using OAT and we would like to know for example: Have you have encountered any product gaps that need to be addressed? Are there business flows that do not suit your requirements? What new features you want to see in the product? Please share your feedback with us and we will discuss it with Oracle Asset Tracking Development and Product teams to improve the product. To share your feedback either post to the dedicated thread in the MOS Install Base Community here OR add a comment to this blog post (note that the blog comment you enter won't immediately be visible in the blog).

    Read the article

  • How To Check If a Transaction Related to Oracle Asset Tracking Has Been Accounted in SLA

    - by LuciaC-Oracle
    In Oracle Asset Tracking (OAT), we often see situations where a pending transaction has failed to be processed by the OAT programs. Typical situations can be: a pending transaction errors with "Unable to derive accounts from sub ledger accounting for the material transaction" a transaction is not picked by OAT programs. The Create Accounting program log file will show error messages and possible corrective actions to solve the error.  But as this is usually a scheduled program, often any errors that are reported are missed by users. To aid OAT users to identify if a transaction has failed and accounting has not been created, we have now created a SQL script which can be run for any pending transaction: How To Check If a Transaction Related to Oracle Asset Tracking Has Been Accounted in SLA ? (Doc ID 1673414.1)Using the script in this note, the user can pass the material transaction ID for the related transaction and the script will check if SLA accounting entries have been created for this specific transaction or not.If the SLA accounting entries have not been created, the script will prompt the user to run Create Accounting program.  After Create Accounting has been run, the user can run the script again to confirm that accounting has been created.

    Read the article

  • Oracle Service Contracts – Calculate Estimated Tax with Higher Accuracy

    - by LuciaC-Oracle
    On a Service Contract the tax rate and its effectivity can change over the contract duration.  Hence, service organizations need to provide an accurate picture of the estimated tax that the customer might end up paying.  Prior to Release 12.1.3+, the Oracle Service Contracts application calculated the estimated tax based on the line/ sub line start date.  With Release 12.1.3+ (via Patch 16601269:R12.OKS.B) , new functionality provides users with an option to calculate tax at contract billing schedule level, thereby considering the changes in tax rate effectivity at that level.A new profile option 'OKS: Calculate Tax at Schedule' has been introduced which can be used to control whether the existing or new functionality is used.  If the profile is set to 'Yes' the application calculates tax at the billing schedule level for all lines/ sub lines.  For more details on the implementation steps and functionality, please refer to Doc ID 1676700.1: Oracle Service Contracts – How To Calculate Estimated Tax with Higher Accuracy.

    Read the article

  • CRM: How to Use iSurvey With iSupplier in R12

    - by LuciaC
    In Oracle Applications it is possible to configure iSupplier to link to an Oracle iSurvey, and for the Oracle iSurvey to be executed for a Supplier. This integration requires: An Oracle Script An Oracle iSurvey linked to the Oracle Script iSupplier Configuration to reference the iSurvey. Once set up, the iSurvey will be available from the supplier tab from the Purchasing Responsibilities and from the iSupplier Portal.  Responses to the survey can be viewed from the Survey Administrator Responsibility. Take a look at Doc ID 1589371.1 for step-by-step details of how to configure and use iSurvey with iSupplier.

    Read the article

  • Universal Work Queue Quick Filter Examples

    - by LuciaC-Oracle
    If you use Universal Work Queue then it's likely that you will want to define and use your own Quick Filters.  Quick Filters allow you to focus on specific work classes based on assigned criteria in a node. This makes it much easier for Agents to view their work grouped in a meaningful way.How to create Universal Work Queue - Quick Filters (Doc ID 803163.1) gives two worked examples to help you understand how to create your own Quick Filters:     Adding a 'Resource Group' filter     Adding an Overdue Amounts filter for use in Collections. We hope you find these examples useful.  Let us know by providing feedback on the document itself or, why not post to the MOS Service Community with your experience and suggestions.

    Read the article

  • To Interface or Not?: Creating a polymorphic model relationship in Ruby on Rails dynamically..

    - by Globalkeith
    Please bear with me for a moment as I try to explain exactly what I would like to achieve. In my Ruby on Rails application I have a model called Page. It represents a web page. I would like to enable the user to arbitrarily attach components to the page. Some examples of "components" would be Picture, PictureCollection, Video, VideoCollection, Background, Audio, Form, Comments. Currently I have a direct relationship between Page and Picture like this: class Page < ActiveRecord::Base has_many :pictures, :as => :imageable, :dependent => :destroy end class Picture < ActiveRecord::Base belongs_to :imageable, :polymorphic => true end This relationship enables the user to associate an arbitrary number of Pictures to the page. Now if I want to provide multiple collections i would need an additional model: class PictureCollection < ActiveRecord::Base belongs_to :collectionable, :polymorphic => true has_many :pictures, :as => :imageable, :dependent => :destroy end And alter Page to reference the new model: class Page < ActiveRecord::Base has_many :picture_collections, :as => :collectionable, :dependent => :destroy end Now it would be possible for the user to add any number of image collections to the page. However this is still very static in term of the :picture_collections reference in the Page model. If I add another "component", for example :video_collections, I would need to declare another reference in page for that component type. So my question is this: Do I need to add a new reference for each component type, or is there some other way? In Actionscript/Java I would declare an interface Component and make all components implement that interface, then I could just have a single attribute :components which contains all of the dynamically associated model objects. This is Rails, and I'm sure there is a great way to achieve this, but its a tricky one to Google. Perhaps you good people have some wise suggestions. Thanks in advance for taking the time to read and answer this.

    Read the article

  • Grails: How can I search through children in a hasMany relationship?

    - by intargc
    If I have a Client domain class, and that Client hasMany Courses. How do I find the course I'm looking for? For instance: class Client { String name static hasMany = [courses:Course] } class Course { String name static belongsTo = [client:Client] } def client = Client.get(1) I want to "find" or "search" within that courses relationship. Maybe something like: client.courses.find(name:'Whatever') Is there any way to do this with Grails?

    Read the article

  • CF Client Variables: is the CDATA - CGLOBAL relationship always 1:1?

    - by ciaranarcher
    Hi We've noticed something odd with our Coldfusion 8 client variables DB. We have many more (about 3 times as many) CGlobal entries as we have CData entries. I would have assumed that the relationship would be 1:1 on the cfid column. Has any one else noticed this before? I have ruled out old data, my sample is less than 3 hours old. We're using SQL Server 2000 to host the tables. Thanks in advance, Ciaran

    Read the article

  • Most performant way to check how many objects are referenced by an to-many relationship in Core Data

    - by dontWatchMyProfile
    Lets say I have an employees relationship in an Company entity, and it's to-many. And they're really many. Apple in 100 years, with 1.258.500.073 employees. Could I simply do something like NSInteger numEmployees = [apple.employees count]; without firing 1.258.500.073 faults? (Well, in 100 years, the iPhone will easily handle so many objects, for sure...but anyways)

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >